diff options
author | Aaron Giles <aaron@aarongiles.com> | 2009-03-12 07:43:03 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2009-03-12 07:43:03 +0000 |
commit | eb539cce9d58a349e0dffff237dc96bb926ca06f (patch) | |
tree | e86162a925dfb228169afd2fb6309cba906400c5 /src/build | |
parent | feb4e2c8b368f5ec7f251e764167fd24708700f3 (diff) |
Many casts added to the core files, and various other tweaks
to make them compile as either C or C++.
Diffstat (limited to 'src/build')
-rw-r--r-- | src/build/file2str.c | 2 | ||||
-rw-r--r-- | src/build/png2bdc.c | 6 | ||||
-rw-r--r-- | src/build/verinfo.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/build/file2str.c b/src/build/file2str.c index c19ca46a513..e7a44742892 100644 --- a/src/build/file2str.c +++ b/src/build/file2str.c @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) fseek(src, 0, SEEK_SET); /* allocate memory */ - buffer = malloc(bytes + 1); + buffer = (unsigned char *)malloc(bytes + 1); if (buffer == NULL) { fprintf(stderr, "Out of memory allocating %d byte buffer\n", bytes); diff --git a/src/build/png2bdc.c b/src/build/png2bdc.c index 1ee75c4d763..c60d7182b37 100644 --- a/src/build/png2bdc.c +++ b/src/build/png2bdc.c @@ -128,10 +128,10 @@ static int render_font_save_cached(render_font *font, const char *filename, UINT numchars++; /* allocate an array to hold the character data */ - chartable = malloc(numchars * CACHED_CHAR_SIZE); + chartable = (UINT8 *)malloc(numchars * CACHED_CHAR_SIZE); /* allocate a temp buffer to compress into */ - tempbuffer = malloc(65536); + tempbuffer = (UINT8 *)malloc(65536); if (chartable == NULL || tempbuffer == NULL) goto error; @@ -405,7 +405,7 @@ int main(int argc, char *argv[]) bdcname = argv[argc - 1]; /* allocate a font */ - font = malloc(sizeof(*font)); + font = (render_font *)malloc(sizeof(*font)); if (font == NULL) return 1; memset(font, 0, sizeof(*font)); diff --git a/src/build/verinfo.c b/src/build/verinfo.c index 998c246afc7..00646ef4b7a 100644 --- a/src/build/verinfo.c +++ b/src/build/verinfo.c @@ -233,7 +233,7 @@ int main(int argc, char *argv[]) fseek(f, 0, SEEK_SET); // allocate a buffer - buffer = malloc(size + 1); + buffer = (char *)malloc(size + 1); if (buffer == NULL) { fclose(f); |