Skip to content

Commit

Permalink
fix compiletime warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
comotion committed Oct 19, 2012
1 parent 1bdfbaa commit 771a3df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions interface_gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ int getInfodataLength(void)
return max_x;
else
return STDBUFFERLENGTH;
(void)max_y; // remove unused var warning
}


Expand Down Expand Up @@ -1337,6 +1338,7 @@ int guiDialogHandleKeys(EObjectType cdktype, void* object, void* clientdata,
while (!done);

return 1;
(void) selection; // unused
}


Expand Down
10 changes: 5 additions & 5 deletions memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ long int memorycounter = 0;
*/
void* memDebugAlloc(const char* file, int line, size_t size)
{
fprintf(stderr, "alloc %5d (%s, line %d)\n", size, file, line);
fprintf(stderr, "alloc %5lu (%s, line %d)\n", size, file, line);
return memRealAlloc(size);
}

Expand All @@ -59,7 +59,7 @@ void* memDebugAlloc(const char* file, int line, size_t size)
*/
void memDebugFree(const char* file, int line, void* ptr, size_t size)
{
fprintf(stderr, "free %5d (%s, line %d)\n", size, file, line);
fprintf(stderr, "free %5lu (%s, line %d)\n", size, file, line);
memRealFree(ptr, size);
}

Expand All @@ -76,7 +76,7 @@ void memDebugFreeString(const char* file, int line, void* ptr)
{
if (ptr)
{
fprintf(stderr, "free %5d (%s, line %d)\n",
fprintf(stderr, "free %5zd (%s, line %d)\n",
strlen(ptr) + 1, file, line);
}

Expand Down Expand Up @@ -118,7 +118,7 @@ void* memRealAlloc(size_t size)
ptr = malloc(size);
if (!ptr)
{
fprintf(stderr, _("out of memory error - tried to allocate %d byte.\n"),
fprintf(stderr, _("out of memory error - tried to allocate %lu byte.\n"),
size);
exit(1);
}
Expand Down Expand Up @@ -200,7 +200,7 @@ void* memRealRealloc(void* ptr, size_t size_old, size_t size_new)
if (!ptr)
{
fprintf(stderr,
_("out of memory error - tried to reallocate %d byte.\n"),
_("out of memory error - tried to reallocate %lu byte.\n"),
size_new);
exit(1);
}
Expand Down

0 comments on commit 771a3df

Please sign in to comment.