mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Reconfigure the default case for the printf switch in order to improve
branch coverage. (CVS 6472) FossilOrigin-Name: 3cc79162dbdbce9d08bb28942128780277101e0d
This commit is contained in:
14
src/printf.c
14
src/printf.c
@@ -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.101 2009/04/08 15:45:32 drh Exp $
|
||||
** $Id: printf.c,v 1.102 2009/04/08 16:10:04 drh Exp $
|
||||
**
|
||||
**************************************************************************
|
||||
**
|
||||
@@ -77,6 +77,8 @@
|
||||
#define etSQLESCAPE3 15 /* %w -> Strings with '\"' doubled */
|
||||
#define etORDINAL 16 /* %r -> 1st, 2nd, 3rd, 4th, etc. English only */
|
||||
|
||||
#define etINVALID 0 /* Any unrecognized conversion type */
|
||||
|
||||
|
||||
/*
|
||||
** An "etByte" is an 8-bit unsigned value.
|
||||
@@ -338,7 +340,8 @@ void sqlite3VXPrintf(
|
||||
flag_long = flag_longlong = 0;
|
||||
}
|
||||
/* Fetch the info entry for the field */
|
||||
infop = 0;
|
||||
infop = &fmtinfo[0];
|
||||
xtype = etINVALID;
|
||||
for(idx=0; idx<ArraySize(fmtinfo); idx++){
|
||||
if( c==fmtinfo[idx].fmttype ){
|
||||
infop = &fmtinfo[idx];
|
||||
@@ -351,9 +354,6 @@ void sqlite3VXPrintf(
|
||||
}
|
||||
}
|
||||
zExtra = 0;
|
||||
if( infop==0 ){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Limit the precision to prevent overflowing buf[] during conversion */
|
||||
@@ -691,6 +691,10 @@ void sqlite3VXPrintf(
|
||||
length = width = 0;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
assert( xtype==etINVALID );
|
||||
return;
|
||||
}
|
||||
}/* End switch over the format type */
|
||||
/*
|
||||
** The text of the conversion is pointed to by "bufpt" and is
|
||||
|
||||
Reference in New Issue
Block a user