|
From: <sv...@va...> - 2011-10-07 09:54:29
|
Author: bart
Date: 2011-10-07 10:49:44 +0100 (Fri, 07 Oct 2011)
New Revision: 12114
Log:
perf/tinycc.c: Avoid that clang warns about out-of-bounds accesses for
array tab[] and also avoid that clang warns about the formatting flag 'L'.
Modified:
trunk/perf/tinycc.c
Modified: trunk/perf/tinycc.c
===================================================================
--- trunk/perf/tinycc.c 2011-10-07 09:45:14 UTC (rev 12113)
+++ trunk/perf/tinycc.c 2011-10-07 09:49:44 UTC (rev 12114)
@@ -2162,7 +2162,7 @@
unsigned long long ull;
struct CString *cstr;
void *ptr;
- int tab[1];
+ int tab[sizeof(long double) / sizeof(int)];
} CValue;
/* value on stack */
@@ -7305,7 +7305,7 @@
case TOK_CLLONG:
case TOK_CULLONG:
/* XXX: not quite exact, but only useful for testing */
- sprintf(p, "%Lu", cv->ull);
+ sprintf(p, "%llu", cv->ull);
break;
case TOK_CCHAR:
case TOK_LCHAR:
|