mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-09 13:33:26 +00:00
Remove useless type casts
This commit is contained in:
parent
988645cf8d
commit
73559b7f0b
@ -468,7 +468,7 @@ int emit_data(int vartype, int consttype, long constval, int constsize)
|
||||
else if (consttype & STRING_TYPE)
|
||||
{
|
||||
datasize = constsize;
|
||||
str = (char *)(uintptr_t)constval;
|
||||
str = (char *)constval;
|
||||
printf("\t%s\t$%02X\n", DB, --constsize);
|
||||
while (constsize-- > 0)
|
||||
{
|
||||
|
@ -11,8 +11,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "tokens.h"
|
||||
#include "symbols.h"
|
||||
|
||||
@ -230,7 +230,7 @@ t_token scan(void)
|
||||
* String constant.
|
||||
*/
|
||||
scantoken = STRING_TOKEN;
|
||||
constval = (long)(uintptr_t)(++scanpos);
|
||||
constval = (long)++scanpos;
|
||||
while (*scanpos && *scanpos != '\"')
|
||||
{
|
||||
if (*scanpos == '\\')
|
||||
@ -472,7 +472,7 @@ int next_line(void)
|
||||
outer_filename = filename;
|
||||
outer_lineno = lineno;
|
||||
new_filename = (char*) malloc(tokenlen-1);
|
||||
strncpy(new_filename, (char*)(uintptr_t)constval, tokenlen-2);
|
||||
strncpy(new_filename, (char*)constval, tokenlen-2);
|
||||
new_filename[tokenlen-2] = 0;
|
||||
inputfile = fopen(new_filename, "r");
|
||||
if (inputfile == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user