Eliminate incorrect cast in printf string argument
authorKeith Packard <keithp@keithp.com>
Thu, 30 Apr 2009 00:46:36 +0000 (17:46 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 30 Apr 2009 00:46:36 +0000 (17:46 -0700)
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.

ao_task.c

index b69f51ee432f61c5b0f408df01c5123301f11e00..06c279e9faa7eb9119cbb53eda77195842f8b680 100644 (file)
--- 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));
        }