1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-10-18 07:24:16 +00:00

Remove useless type casts

This commit is contained in:
David Schmenk 2017-02-12 19:03:46 -08:00
parent 988645cf8d
commit 73559b7f0b
2 changed files with 4 additions and 4 deletions

View File

@ -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)
{

View File

@ -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) {