Retweak last check-in to retain compile-time checking of xprintf() arguments.

FossilOrigin-Name: 670174916c660b24ba70e96a42984eb65ee52da50e9828bdeca4c9ff4bf92e20
This commit is contained in:
larrybr 2024-02-16 18:34:21 +00:00
parent 816f677c1c
commit fd2500f98b
3 changed files with 23 additions and 14 deletions

View File

@ -1,5 +1,5 @@
C Work\saround\sa\s__VA_ARGS__\scomplaint\sin\sfiddle\sbuilds.
D 2024-02-16T16:04:31.416
C Retweak\slast\scheck-in\sto\sretain\scompile-time\schecking\sof\sxprintf()\sarguments.
D 2024-02-16T18:34:21.033
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -740,7 +740,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c d77c6160bc8f249c2196fdd3e75f66a1dd70e37aa25c39aedc7b1f93c42b7c6d
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c 43fabfc01bf87addd15e39f112f1e2ade15b19594835ab8a9e5bd50839d4e1b1
F src/shell.c.in d0092ec6794ea162f0b1553d7be8d1275726cb504f170035a4e0742a1a3fba75
F src/shell.c.in e4a38496290d3979ea3d953fba0bc187d350d6e80f8e33c2e37b9a924850439b
F src/sqlite.h.in 020d7b7307dda51420dc48b47e5334eaface77baba6bd9818375d392eb3ab5b5
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54
@ -2162,8 +2162,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P b4790da5e0d6f0f617e6c3a17fc2606842e41cab14339392abd335410fec0aa3
R 759fda60be6ab3de32b04d89f6276871
U stephan
Z d154d8c6872615f4f0b58afcdd6f17b3
P 7d750248c58ccbf87036ea7db053def1c83c7a8ed428a5c47895756302b36200
R 6ea6e9f84387bdd065f35367386a097e
U larrybr
Z 849b6ec66e03430774f8a485b79fa305
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
7d750248c58ccbf87036ea7db053def1c83c7a8ed428a5c47895756302b36200
670174916c660b24ba70e96a42984eb65ee52da50e9828bdeca4c9ff4bf92e20

View File

@ -268,6 +268,9 @@ INCLUDE ../ext/consio/console_io.c
* setOutputStream(FILE *pf)
* This is normally the stream that CLI normal output goes to.
* For the stand-alone CLI, it is stdout with no .output redirect.
*
* The ?putz(z) forms are required for the Fiddle builds for string literal
* output, in aid of enforcing format string to argument correspondence.
*/
# define sputz(s,z) fPutsUtf8(z,s)
# define sputf fPrintfUtf8
@ -279,12 +282,18 @@ INCLUDE ../ext/consio/console_io.c
#else
/* For Fiddle, all console handling and emit redirection is omitted. */
# define sputz(fp,z) fputs(z,fp)
# define sputf fprintf
# define oputz(z) fputs(z,stdout)
# define oputf printf
# define eputz(z) fputs(z,stderr)
/* These next 3 macros are for emitting formatted output. When complaints
* from the WASM build are issued for non-formatted output, (when a mere
* string literal is to be emitted, the ?putz(z) forms should be used.
* (This permits compile-time checking of format string / argument mismatch.)
*/
# define oputf(fmt, ...) printf(fmt,__VA_ARGS__)
# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__)
# define sputf(fp,fmt, ...) fprintf(fp,fmt,__VA_ARGS__)
/* These next 3 macros are for emitting simple string literals. */
# define oputz(z) fputs(z,stdout)
# define eputz(z) fputs(z,stderr)
# define sputz(fp,z) fputs(z,fp)
# define oputb(buf,na) fwrite(buf,1,na,stdout)
#endif
@ -11079,7 +11088,7 @@ static int do_meta_command(char *zLine, ShellState *p){
}
}
if( bShowHelp ){
oputf(
oputz(
"Usage: .testctrl fault_install ARGS\n"
"Possible arguments:\n"
" off Disable faultsim\n"