Fossil SCM

Enable -Wall on default builds. Fix harmless compiler warnings.

drh 2017-12-06 01:44 trunk
Commit 3f2cde2ce4c8f50e4a58769071694950425e4761f3b65ea5de75105db024bb5d
3 files changed +3 -3 -1 +1 -1
+3 -3
--- auto.def
+++ auto.def
@@ -35,11 +35,11 @@
3535
define USE_PREAD [cc-check-functions pread]
3636
3737
# Find tclsh for the test suite. Can't yet use jimsh for this.
3838
cc-check-progs tclsh
3939
40
-define EXTRA_CFLAGS ""
40
+define EXTRA_CFLAGS "-Wall"
4141
define EXTRA_LDFLAGS ""
4242
define USE_SYSTEM_SQLITE 0
4343
define USE_LINENOISE 0
4444
define FOSSIL_ENABLE_MINIZ 0
4545
define USE_SEE 0
@@ -133,16 +133,16 @@
133133
define-append EXTRA_CFLAGS {-D_XOPEN_SOURCE=500 -D__EXTENSIONS__}
134134
}
135135
136136
if {[opt-bool fossil-debug]} {
137137
define-append EXTRA_CFLAGS -DFOSSIL_DEBUG
138
- define CFLAGS {-g -O0}
138
+ define CFLAGS {-g -O0 -Wall}
139139
msg-result "Debugging support enabled"
140140
}
141141
142142
if {[opt-bool no-opt]} {
143
- define CFLAGS {-g -O0}
143
+ define CFLAGS {-g -O0 -Wall}
144144
msg-result "Builting without compiler optimization"
145145
}
146146
147147
if {[opt-bool with-see]} {
148148
define-append EXTRA_CFLAGS -DUSE_SEE
149149
--- auto.def
+++ auto.def
@@ -35,11 +35,11 @@
35 define USE_PREAD [cc-check-functions pread]
36
37 # Find tclsh for the test suite. Can't yet use jimsh for this.
38 cc-check-progs tclsh
39
40 define EXTRA_CFLAGS ""
41 define EXTRA_LDFLAGS ""
42 define USE_SYSTEM_SQLITE 0
43 define USE_LINENOISE 0
44 define FOSSIL_ENABLE_MINIZ 0
45 define USE_SEE 0
@@ -133,16 +133,16 @@
133 define-append EXTRA_CFLAGS {-D_XOPEN_SOURCE=500 -D__EXTENSIONS__}
134 }
135
136 if {[opt-bool fossil-debug]} {
137 define-append EXTRA_CFLAGS -DFOSSIL_DEBUG
138 define CFLAGS {-g -O0}
139 msg-result "Debugging support enabled"
140 }
141
142 if {[opt-bool no-opt]} {
143 define CFLAGS {-g -O0}
144 msg-result "Builting without compiler optimization"
145 }
146
147 if {[opt-bool with-see]} {
148 define-append EXTRA_CFLAGS -DUSE_SEE
149
--- auto.def
+++ auto.def
@@ -35,11 +35,11 @@
35 define USE_PREAD [cc-check-functions pread]
36
37 # Find tclsh for the test suite. Can't yet use jimsh for this.
38 cc-check-progs tclsh
39
40 define EXTRA_CFLAGS "-Wall"
41 define EXTRA_LDFLAGS ""
42 define USE_SYSTEM_SQLITE 0
43 define USE_LINENOISE 0
44 define FOSSIL_ENABLE_MINIZ 0
45 define USE_SEE 0
@@ -133,16 +133,16 @@
133 define-append EXTRA_CFLAGS {-D_XOPEN_SOURCE=500 -D__EXTENSIONS__}
134 }
135
136 if {[opt-bool fossil-debug]} {
137 define-append EXTRA_CFLAGS -DFOSSIL_DEBUG
138 define CFLAGS {-g -O0 -Wall}
139 msg-result "Debugging support enabled"
140 }
141
142 if {[opt-bool no-opt]} {
143 define CFLAGS {-g -O0 -Wall}
144 msg-result "Builting without compiler optimization"
145 }
146
147 if {[opt-bool with-see]} {
148 define-append EXTRA_CFLAGS -DUSE_SEE
149
-1
--- src/info.c
+++ src/info.c
@@ -1060,11 +1060,10 @@
10601060
const char *zBranch;
10611061
const char *zFrom;
10621062
const char *zTo;
10631063
const char *zRe;
10641064
const char *zW;
1065
- const char *zVerbose;
10661065
const char *zGlob;
10671066
ReCompiled *pRe = 0;
10681067
login_check_credentials();
10691068
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
10701069
login_anonymous_available();
10711070
--- src/info.c
+++ src/info.c
@@ -1060,11 +1060,10 @@
1060 const char *zBranch;
1061 const char *zFrom;
1062 const char *zTo;
1063 const char *zRe;
1064 const char *zW;
1065 const char *zVerbose;
1066 const char *zGlob;
1067 ReCompiled *pRe = 0;
1068 login_check_credentials();
1069 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
1070 login_anonymous_available();
1071
--- src/info.c
+++ src/info.c
@@ -1060,11 +1060,10 @@
1060 const char *zBranch;
1061 const char *zFrom;
1062 const char *zTo;
1063 const char *zRe;
1064 const char *zW;
 
1065 const char *zGlob;
1066 ReCompiled *pRe = 0;
1067 login_check_credentials();
1068 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
1069 login_anonymous_available();
1070
+1 -1
--- src/zip.c
+++ src/zip.c
@@ -449,11 +449,11 @@
449449
int nIn = blob_size(pFile);
450450
unsigned long int nOut = nIn;
451451
sqlite3_bind_int(p->pInsert, 2, mPerm==PERM_EXE ? 0100755 : 0100644);
452452
sqlite3_bind_int(p->pInsert, 4, nIn);
453453
zip_blob_minsize(&p->tmp, nIn);
454
- compress(
454
+ compress( (unsigned char*)
455455
blob_buffer(&p->tmp), &nOut, (unsigned char*)blob_buffer(pFile), nIn
456456
);
457457
if( nOut>=nIn ){
458458
sqlite3_bind_blob(p->pInsert, 5,
459459
blob_buffer(pFile), blob_size(pFile), SQLITE_STATIC
460460
--- src/zip.c
+++ src/zip.c
@@ -449,11 +449,11 @@
449 int nIn = blob_size(pFile);
450 unsigned long int nOut = nIn;
451 sqlite3_bind_int(p->pInsert, 2, mPerm==PERM_EXE ? 0100755 : 0100644);
452 sqlite3_bind_int(p->pInsert, 4, nIn);
453 zip_blob_minsize(&p->tmp, nIn);
454 compress(
455 blob_buffer(&p->tmp), &nOut, (unsigned char*)blob_buffer(pFile), nIn
456 );
457 if( nOut>=nIn ){
458 sqlite3_bind_blob(p->pInsert, 5,
459 blob_buffer(pFile), blob_size(pFile), SQLITE_STATIC
460
--- src/zip.c
+++ src/zip.c
@@ -449,11 +449,11 @@
449 int nIn = blob_size(pFile);
450 unsigned long int nOut = nIn;
451 sqlite3_bind_int(p->pInsert, 2, mPerm==PERM_EXE ? 0100755 : 0100644);
452 sqlite3_bind_int(p->pInsert, 4, nIn);
453 zip_blob_minsize(&p->tmp, nIn);
454 compress( (unsigned char*)
455 blob_buffer(&p->tmp), &nOut, (unsigned char*)blob_buffer(pFile), nIn
456 );
457 if( nOut>=nIn ){
458 sqlite3_bind_blob(p->pInsert, 5,
459 blob_buffer(pFile), blob_size(pFile), SQLITE_STATIC
460

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button