Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Include main.mk in the makefile integration for the codecheck1 tool. Also fix dependency issue with the MinGW makefiles. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | compile-time-print-checking |
Files: | files | file ages | folders |
SHA1: | 5ea84522ec867b34af8fe091170be440 |
User & Date: | mistachkin 2014-10-21 02:09:19 |
Context
2014-10-21
| ||
02:52 | Add the codecheck1 program to the build tools. This program validates the format strings on printf-style internal interfaces, verifying that the correct number of arguments follow and that SQL is protected from injection attacks. check-in: 49b0ff15 user: drh tags: trunk | |
02:09 | Include main.mk in the makefile integration for the codecheck1 tool. Also fix dependency issue with the MinGW makefiles. Closed-Leaf check-in: 5ea84522 user: mistachkin tags: compile-time-print-checking | |
2014-10-20
| ||
20:47 | Improve makefile integration for the codecheck1 tool. check-in: 5edc0193 user: mistachkin tags: compile-time-print-checking | |
Changes
Changes to src/codecheck1.c.
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 |
int eToken; int ln = lnFCall; int len; const char *zStart; char *z; char *zCopy; int nArg = 0; char **azArg = 0; int i, k; int nErr = 0; char *acType; szFName = token_length(zFCall, &eToken, &ln); zStart = next_non_whitespace(zFCall+szFName, &len, &eToken); assert( zStart[0]=='(' && len==1 ); |
| |
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 |
int eToken;
int ln = lnFCall;
int len;
const char *zStart;
char *z;
char *zCopy;
int nArg = 0;
char const **azArg = 0;
int i, k;
int nErr = 0;
char *acType;
szFName = token_length(zFCall, &eToken, &ln);
zStart = next_non_whitespace(zFCall+szFName, &len, &eToken);
assert( zStart[0]=='(' && len==1 );
|
Changes to src/main.mk.
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
...
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
|
all: $(OBJDIR) $(APPNAME) install: $(APPNAME) mkdir -p $(INSTALLDIR) mv $(APPNAME) $(INSTALLDIR) codecheck: $(APPNAME) $(OBJDIR)/codecheck1 $(OBJDIR)/codecheck1 $(TRANS_SRC) $(OBJDIR): -mkdir $(OBJDIR) $(OBJDIR)/translate: $(SRCDIR)/translate.c $(BCC) -o $(OBJDIR)/translate $(SRCDIR)/translate.c ................................................................................ $(OBJDIR)/shell.o \ $(OBJDIR)/th.o \ $(OBJDIR)/th_lang.o \ $(OBJDIR)/th_tcl.o \ $(OBJDIR)/cson_amalgamation.o $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) # This rule prevents make from using its default rules to try build # an executable named "manifest" out of the file named "manifest.c" # $(SRCDIR)/../manifest: # noop |
|
|
>
|
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
...
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
|
all: $(OBJDIR) $(APPNAME) install: $(APPNAME) mkdir -p $(INSTALLDIR) mv $(APPNAME) $(INSTALLDIR) codecheck: $(TRANS_SRC) $(OBJDIR)/codecheck1 $(OBJDIR)/codecheck1 $(TRANS_SRC) $(OBJDIR): -mkdir $(OBJDIR) $(OBJDIR)/translate: $(SRCDIR)/translate.c $(BCC) -o $(OBJDIR)/translate $(SRCDIR)/translate.c ................................................................................ $(OBJDIR)/shell.o \ $(OBJDIR)/th.o \ $(OBJDIR)/th_lang.o \ $(OBJDIR)/th_tcl.o \ $(OBJDIR)/cson_amalgamation.o $(APPNAME): $(OBJDIR)/headers $(OBJDIR)/codecheck1 $(OBJ) $(EXTRAOBJ) $(OBJDIR)/codecheck1 $(TRANS_SRC) $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) # This rule prevents make from using its default rules to try build # an executable named "manifest" out of the file named "manifest.c" # $(SRCDIR)/../manifest: # noop |
Changes to src/makemake.tcl.
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 ... 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 ... 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 |
<<<MINIZ_OPTIONS>>> [join $MINIZ_OPTIONS " \\\n "]] { all: $(OBJDIR) $(APPNAME) install: $(APPNAME) mkdir -p $(INSTALLDIR) mv $(APPNAME) $(INSTALLDIR) codecheck: $(APPNAME) $(OBJDIR)/codecheck1 $(OBJDIR)/codecheck1 $(TRANS_SRC) $(OBJDIR): -mkdir $(OBJDIR) $(OBJDIR)/translate: $(SRCDIR)/translate.c $(BCC) -o $(OBJDIR)/translate $(SRCDIR)/translate.c ................................................................................ $(OBJDIR)/th.o <<<NEXT_LINE>>> $(OBJDIR)/th_lang.o <<<NEXT_LINE>>> $(OBJDIR)/th_tcl.o <<<NEXT_LINE>>> $(OBJDIR)/cson_amalgamation.o }] writeln { $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) # This rule prevents make from using its default rules to try build # an executable named "manifest" out of the file named "manifest.c" # $(SRCDIR)/../manifest: # noop ................................................................................ APPTARGETS += $(LIBTARGETS) ifdef FOSSIL_BUILD_SSL APPTARGETS += openssl endif $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o $(APPTARGETS) $(CODECHECK1) $(TRANS_SRC) $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o # This rule prevents make from using its default rules to try build # an executable named "manifest" out of the file named "manifest.c" # $(SRCDIR)/../manifest: |
| | > | |
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 ... 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 ... 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 |
<<<MINIZ_OPTIONS>>> [join $MINIZ_OPTIONS " \\\n "]] { all: $(OBJDIR) $(APPNAME) install: $(APPNAME) mkdir -p $(INSTALLDIR) mv $(APPNAME) $(INSTALLDIR) codecheck: $(TRANS_SRC) $(OBJDIR)/codecheck1 $(OBJDIR)/codecheck1 $(TRANS_SRC) $(OBJDIR): -mkdir $(OBJDIR) $(OBJDIR)/translate: $(SRCDIR)/translate.c $(BCC) -o $(OBJDIR)/translate $(SRCDIR)/translate.c ................................................................................ $(OBJDIR)/th.o <<<NEXT_LINE>>> $(OBJDIR)/th_lang.o <<<NEXT_LINE>>> $(OBJDIR)/th_tcl.o <<<NEXT_LINE>>> $(OBJDIR)/cson_amalgamation.o }] writeln { $(APPNAME): $(OBJDIR)/headers $(OBJDIR)/codecheck1 $(OBJ) $(EXTRAOBJ) $(OBJDIR)/codecheck1 $(TRANS_SRC) $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) # This rule prevents make from using its default rules to try build # an executable named "manifest" out of the file named "manifest.c" # $(SRCDIR)/../manifest: # noop ................................................................................ APPTARGETS += $(LIBTARGETS) ifdef FOSSIL_BUILD_SSL APPTARGETS += openssl endif $(APPNAME): $(OBJDIR)/headers $(OBJ) $(CODECHECK1) $(EXTRAOBJ) $(OBJDIR)/fossil.o $(APPTARGETS) $(CODECHECK1) $(TRANS_SRC) $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o # This rule prevents make from using its default rules to try build # an executable named "manifest" out of the file named "manifest.c" # $(SRCDIR)/../manifest: |
Changes to win/Makefile.mingw.
818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 |
APPTARGETS += $(LIBTARGETS) ifdef FOSSIL_BUILD_SSL APPTARGETS += openssl endif $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o $(APPTARGETS) $(CODECHECK1) $(TRANS_SRC) $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o # This rule prevents make from using its default rules to try build # an executable named "manifest" out of the file named "manifest.c" # $(SRCDIR)/../manifest: |
| |
818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 |
APPTARGETS += $(LIBTARGETS)
ifdef FOSSIL_BUILD_SSL
APPTARGETS += openssl
endif
$(APPNAME): $(OBJDIR)/headers $(CODECHECK1) $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o $(APPTARGETS)
$(CODECHECK1) $(TRANS_SRC)
$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
# This rule prevents make from using its default rules to try build
# an executable named "manifest" out of the file named "manifest.c"
#
$(SRCDIR)/../manifest:
|
Changes to win/Makefile.mingw.mistachkin.
818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 |
APPTARGETS += $(LIBTARGETS) ifdef FOSSIL_BUILD_SSL APPTARGETS += openssl endif $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o $(APPTARGETS) $(CODECHECK1) $(TRANS_SRC) $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o # This rule prevents make from using its default rules to try build # an executable named "manifest" out of the file named "manifest.c" # $(SRCDIR)/../manifest: |
| |
818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 |
APPTARGETS += $(LIBTARGETS)
ifdef FOSSIL_BUILD_SSL
APPTARGETS += openssl
endif
$(APPNAME): $(OBJDIR)/headers $(CODECHECK1) $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o $(APPTARGETS)
$(CODECHECK1) $(TRANS_SRC)
$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
# This rule prevents make from using its default rules to try build
# an executable named "manifest" out of the file named "manifest.c"
#
$(SRCDIR)/../manifest:
|