Make sure va_arg() does not occur on the same line as any "if" statement

or "?" operator. (CVS 6602)

FossilOrigin-Name: 3543be6e34ebff48b1b0c1710ae6fec557b09b52
This commit is contained in:
drh 2009-05-04 20:20:16 +00:00
parent 11c327aabe
commit eeb23a4c24
3 changed files with 23 additions and 15 deletions

View File

@ -1,5 +1,5 @@
C Avoid\sparsing\scells\sthat\sfit\sentirely\son\sthe\sb-tree\spage\swhen\ssearching\sa\sb-tree\sindex.\s(CVS\s6601)
D 2009-05-04T19:01:26
C Make\ssure\sva_arg()\sdoes\snot\soccur\son\sthe\ssame\sline\sas\sany\s"if"\sstatement\nor\s"?"\soperator.\s(CVS\s6602)
D 2009-05-04T20:20:16
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -154,7 +154,7 @@ F src/pcache.h 9b927ccc5a538e31b4c3bc7eec4f976db42a1324
F src/pcache1.c 35f8601c91c09a1e887a1914ebca07bb5afc7b89
F src/pragma.c c26c16c49a80d03c8597f0e6c7daba53f283428f
F src/prepare.c 72d74e6d3b9c8eb0663b33ec6438aa718096ac79
F src/printf.c ea2d76000cc5f4579d7e9cb2f5460433eec0d384
F src/printf.c 3f4dca207a88258d37af5a7a03e800a825fe6456
F src/random.c 676b9d7ac820fe81e6fb2394ac8c10cff7f38628
F src/resolve.c d01b53d81ab9b28ba7161c1af9e02bc90bbd685b
F src/rowset.c 14d12b5e81b5907b87d511f6f4219805f96a4b55
@ -727,7 +727,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P c7615b44583c4b3afa45b57c6047478c18c234e9
R a1f1431e2f3be0df2e97e7004ec2ab35
U danielk1977
Z 615e89480489b234d20acace24b33a9c
P 77a8239548722f702ead9d7c60df0d68180948fb
R 49a752b5e2e2337589ff9ef82e78f281
U drh
Z bdc5440ddff4f2d94ee79f85a0798ddf

View File

@ -1 +1 @@
77a8239548722f702ead9d7c60df0d68180948fb
3543be6e34ebff48b1b0c1710ae6fec557b09b52

View File

@ -5,7 +5,7 @@
** an historical reference. Most of the "enhancements" have been backed
** out so that the functionality is now the same as standard printf().
**
** $Id: printf.c,v 1.102 2009/04/08 16:10:04 drh Exp $
** $Id: printf.c,v 1.103 2009/05/04 20:20:16 drh Exp $
**
**************************************************************************
**
@ -391,9 +391,13 @@ void sqlite3VXPrintf(
case etRADIX:
if( infop->flags & FLAG_SIGNED ){
i64 v;
if( flag_longlong ) v = va_arg(ap,i64);
else if( flag_long ) v = va_arg(ap,long int);
else v = va_arg(ap,int);
if( flag_longlong ){
v = va_arg(ap,i64);
}else if( flag_long ){
v = va_arg(ap,long int);
}else{
v = va_arg(ap,int);
}
if( v<0 ){
longvalue = -v;
prefix = '-';
@ -404,9 +408,13 @@ void sqlite3VXPrintf(
else prefix = 0;
}
}else{
if( flag_longlong ) longvalue = va_arg(ap,u64);
else if( flag_long ) longvalue = va_arg(ap,unsigned long int);
else longvalue = va_arg(ap,unsigned int);
if( flag_longlong ){
longvalue = va_arg(ap,u64);
}else if( flag_long ){
longvalue = va_arg(ap,unsigned long int);
}else{
longvalue = va_arg(ap,unsigned int);
}
prefix = 0;
}
if( longvalue==0 ) flag_alternateform = 0;