Fossil SCM

Police various compiler warnings.

mistachkin 2011-11-05 00:23 jimtcl
Commit 536fb1d6e0d4f022b55437700805b9946f652bee
+3 -1
--- src/merge3.c
+++ src/merge3.c
@@ -27,11 +27,13 @@
2727
#define DEBUG(X)
2828
#define ISDEBUG 0
2929
#endif
3030
3131
/* The minimum of two integers */
32
-#define min(A,B) (A<B?A:B)
32
+#ifndef min
33
+# define min(A,B) (A<B?A:B)
34
+#endif
3335
3436
/*
3537
** Compare N lines of text from pV1 and pV2. If the lines
3638
** are the same, return true. Return false if one or more of the N
3739
** lines are different.
3840
--- src/merge3.c
+++ src/merge3.c
@@ -27,11 +27,13 @@
27 #define DEBUG(X)
28 #define ISDEBUG 0
29 #endif
30
31 /* The minimum of two integers */
32 #define min(A,B) (A<B?A:B)
 
 
33
34 /*
35 ** Compare N lines of text from pV1 and pV2. If the lines
36 ** are the same, return true. Return false if one or more of the N
37 ** lines are different.
38
--- src/merge3.c
+++ src/merge3.c
@@ -27,11 +27,13 @@
27 #define DEBUG(X)
28 #define ISDEBUG 0
29 #endif
30
31 /* The minimum of two integers */
32 #ifndef min
33 # define min(A,B) (A<B?A:B)
34 #endif
35
36 /*
37 ** Compare N lines of text from pV1 and pV2. If the lines
38 ** are the same, return true. Return false if one or more of the N
39 ** lines are different.
40
+1 -1
--- src/name.c
+++ src/name.c
@@ -426,11 +426,11 @@
426426
db_prepare(&q,
427427
"SELECT type, datetime(mtime,'localtime'),"
428428
" coalesce(euser,user), coalesce(ecomment,comment)"
429429
" FROM event WHERE objid=%d", rid);
430430
if( db_step(&q)==SQLITE_ROW ){
431
- const char *zType;
431
+ const char *zType = 0;
432432
switch( db_column_text(&q,0)[0] ){
433433
case 'c': zType = "Check-in"; break;
434434
case 'w': zType = "Wiki-edit"; break;
435435
case 'e': zType = "Event"; break;
436436
case 't': zType = "Ticket-change"; break;
437437
--- src/name.c
+++ src/name.c
@@ -426,11 +426,11 @@
426 db_prepare(&q,
427 "SELECT type, datetime(mtime,'localtime'),"
428 " coalesce(euser,user), coalesce(ecomment,comment)"
429 " FROM event WHERE objid=%d", rid);
430 if( db_step(&q)==SQLITE_ROW ){
431 const char *zType;
432 switch( db_column_text(&q,0)[0] ){
433 case 'c': zType = "Check-in"; break;
434 case 'w': zType = "Wiki-edit"; break;
435 case 'e': zType = "Event"; break;
436 case 't': zType = "Ticket-change"; break;
437
--- src/name.c
+++ src/name.c
@@ -426,11 +426,11 @@
426 db_prepare(&q,
427 "SELECT type, datetime(mtime,'localtime'),"
428 " coalesce(euser,user), coalesce(ecomment,comment)"
429 " FROM event WHERE objid=%d", rid);
430 if( db_step(&q)==SQLITE_ROW ){
431 const char *zType = 0;
432 switch( db_column_text(&q,0)[0] ){
433 case 'c': zType = "Check-in"; break;
434 case 'w': zType = "Wiki-edit"; break;
435 case 'e': zType = "Event"; break;
436 case 't': zType = "Ticket-change"; break;
437
+5 -4
--- src/th_main.c
+++ src/th_main.c
@@ -19,10 +19,15 @@
1919
** (an independent project) and fossil.
2020
*/
2121
#include "config.h"
2222
#include "th_main.h"
2323
24
+/*
25
+** Interfaces to register the scripting language extensions.
26
+*/
27
+int register_tcl(Jim_Interp *interp, void *pContext); /* th_tcl.c */
28
+
2429
/*
2530
** Generate a TH1 trace message if debugging is enabled.
2631
*/
2732
void Th_Trace(const char *zFormat, ...){
2833
va_list ap;
@@ -231,16 +236,12 @@
231236
Jim_WrongNumArgs(interp, 1, argv, "NAME TEXT-LIST NUMLINES");
232237
return JIM_ERR;
233238
}
234239
if( enableOutput ){
235240
long height;
236
- int nValue;
237
- const char *zValue;
238241
char *z, *zH;
239242
int nElem;
240
- int *aszElem;
241
- char **azElem;
242243
int i;
243244
Jim_Obj *objPtr;
244245
Jim_Obj *varObjPtr;
245246
246247
if( Jim_GetLong(interp, argv[3], &height) ) return JIM_ERR;
247248
--- src/th_main.c
+++ src/th_main.c
@@ -19,10 +19,15 @@
19 ** (an independent project) and fossil.
20 */
21 #include "config.h"
22 #include "th_main.h"
23
 
 
 
 
 
24 /*
25 ** Generate a TH1 trace message if debugging is enabled.
26 */
27 void Th_Trace(const char *zFormat, ...){
28 va_list ap;
@@ -231,16 +236,12 @@
231 Jim_WrongNumArgs(interp, 1, argv, "NAME TEXT-LIST NUMLINES");
232 return JIM_ERR;
233 }
234 if( enableOutput ){
235 long height;
236 int nValue;
237 const char *zValue;
238 char *z, *zH;
239 int nElem;
240 int *aszElem;
241 char **azElem;
242 int i;
243 Jim_Obj *objPtr;
244 Jim_Obj *varObjPtr;
245
246 if( Jim_GetLong(interp, argv[3], &height) ) return JIM_ERR;
247
--- src/th_main.c
+++ src/th_main.c
@@ -19,10 +19,15 @@
19 ** (an independent project) and fossil.
20 */
21 #include "config.h"
22 #include "th_main.h"
23
24 /*
25 ** Interfaces to register the scripting language extensions.
26 */
27 int register_tcl(Jim_Interp *interp, void *pContext); /* th_tcl.c */
28
29 /*
30 ** Generate a TH1 trace message if debugging is enabled.
31 */
32 void Th_Trace(const char *zFormat, ...){
33 va_list ap;
@@ -231,16 +236,12 @@
236 Jim_WrongNumArgs(interp, 1, argv, "NAME TEXT-LIST NUMLINES");
237 return JIM_ERR;
238 }
239 if( enableOutput ){
240 long height;
 
 
241 char *z, *zH;
242 int nElem;
 
 
243 int i;
244 Jim_Obj *objPtr;
245 Jim_Obj *varObjPtr;
246
247 if( Jim_GetLong(interp, argv[3], &height) ) return JIM_ERR;
248
+1 -1
--- src/tkt.c
+++ src/tkt.c
@@ -98,11 +98,11 @@
9898
** obscured.
9999
*/
100100
static void initializeVariablesFromDb(void){
101101
const char *zName;
102102
Stmt q;
103
- int i, n, size, j;
103
+ int i, n, j;
104104
105105
zName = PD("name","-none-");
106106
db_prepare(&q, "SELECT datetime(tkt_mtime,'localtime') AS tkt_datetime, *"
107107
" FROM ticket WHERE tkt_uuid GLOB '%q*'", zName);
108108
if( db_step(&q)==SQLITE_ROW ){
109109
--- src/tkt.c
+++ src/tkt.c
@@ -98,11 +98,11 @@
98 ** obscured.
99 */
100 static void initializeVariablesFromDb(void){
101 const char *zName;
102 Stmt q;
103 int i, n, size, j;
104
105 zName = PD("name","-none-");
106 db_prepare(&q, "SELECT datetime(tkt_mtime,'localtime') AS tkt_datetime, *"
107 " FROM ticket WHERE tkt_uuid GLOB '%q*'", zName);
108 if( db_step(&q)==SQLITE_ROW ){
109
--- src/tkt.c
+++ src/tkt.c
@@ -98,11 +98,11 @@
98 ** obscured.
99 */
100 static void initializeVariablesFromDb(void){
101 const char *zName;
102 Stmt q;
103 int i, n, j;
104
105 zName = PD("name","-none-");
106 db_prepare(&q, "SELECT datetime(tkt_mtime,'localtime') AS tkt_datetime, *"
107 " FROM ticket WHERE tkt_uuid GLOB '%q*'", zName);
108 if( db_step(&q)==SQLITE_ROW ){
109

Keyboard Shortcuts

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