From: Keith Packard Date: Thu, 30 Apr 2009 00:46:36 +0000 (-0700) Subject: Eliminate incorrect cast in printf string argument X-Git-Tag: 0.2~21 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=4ae74fffb939d67424efa3e7f433637f1f920ebc Eliminate incorrect cast in printf string argument char * is a pointer to a string in the default address space, not a generic pointer to a string. As such, the compiler (at least 2.9.0) mis-compiles this if the cast is included. --- diff --git a/ao_task.c b/ao_task.c index b69f51ee..06c279e9 100644 --- a/ao_task.c +++ b/ao_task.c @@ -209,7 +209,7 @@ ao_task_info(void) task = ao_tasks[i]; pc_loc = task->stack_count - 17; printf("%12s: wchan %04x pc %04x\n", - (char *) task->name, + task->name, (int16_t) task->wchan, (task->stack[pc_loc]) | (task->stack[pc_loc+1] << 8)); }