diff options
| author | Nathan Conrad <[email protected]> | 2018-03-26 19:35:41 -0400 |
|---|---|---|
| committer | Nathan Conrad <[email protected]> | 2018-03-26 19:35:41 -0400 |
| commit | 17ff26759ca0fb41095d2d0afaaed3059e6360ad (patch) | |
| tree | 9a6b3ec0a91fcbd6e10662e23193408658ef2682 /libcuda/cuobjdump.l | |
| parent | 5373d10cd2b5dde7c94cccf6e07b8f59869223af (diff) | |
Don't directly pass strings to printf (beacuse they wouldn't be escapped). Clang gives warnings about this.
Diffstat (limited to 'libcuda/cuobjdump.l')
| -rw-r--r-- | libcuda/cuobjdump.l | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libcuda/cuobjdump.l b/libcuda/cuobjdump.l index f63ee73..0953ea1 100644 --- a/libcuda/cuobjdump.l +++ b/libcuda/cuobjdump.l @@ -159,8 +159,6 @@ newlines {newline}+ %% void cuobjdump_error(const char* message) { - printf(" "); printf(message); printf(" near \""); printf(yytext); printf("\""); - printf(" on line "); - char line[5]; sprintf(line, "%i", yylineno); printf(line); - printf("\n"); + printf(" %s near \"%s\"",message, yytext); + printf(" on line %i\n",yylineno); } |
