Fossil SCM

Fix some compiler warnings on windows.

drh 2010-03-18 14:20 trunk
Commit 73c24ae363ee1b2234a3e322df124577ab3c7dcf
+4
--- src/db.c
+++ src/db.c
@@ -516,10 +516,14 @@
516516
z = 0;
517517
}
518518
db_finalize(&s);
519519
return z;
520520
}
521
+
522
+#ifdef __MINGW32__
523
+extern char *sqlite3_win32_mbcs_to_utf8(const char*);
524
+#endif
521525
522526
/*
523527
** Initialize a new database file with the given schema. If anything
524528
** goes wrong, call db_err() to exit.
525529
*/
526530
--- src/db.c
+++ src/db.c
@@ -516,10 +516,14 @@
516 z = 0;
517 }
518 db_finalize(&s);
519 return z;
520 }
 
 
 
 
521
522 /*
523 ** Initialize a new database file with the given schema. If anything
524 ** goes wrong, call db_err() to exit.
525 */
526
--- src/db.c
+++ src/db.c
@@ -516,10 +516,14 @@
516 z = 0;
517 }
518 db_finalize(&s);
519 return z;
520 }
521
522 #ifdef __MINGW32__
523 extern char *sqlite3_win32_mbcs_to_utf8(const char*);
524 #endif
525
526 /*
527 ** Initialize a new database file with the given schema. If anything
528 ** goes wrong, call db_err() to exit.
529 */
530
+1 -1
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -49,11 +49,11 @@
4949
}
5050
5151
/*
5252
** This function implements a cross-platform "system()" interface.
5353
*/
54
-int portable_system(char *zOrigCmd){
54
+int portable_system(const char *zOrigCmd){
5555
int rc;
5656
#ifdef __MINGW32__
5757
/* On windows, we have to put double-quotes around the entire command.
5858
** Who knows why - this is just the way windows works.
5959
*/
6060
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -49,11 +49,11 @@
49 }
50
51 /*
52 ** This function implements a cross-platform "system()" interface.
53 */
54 int portable_system(char *zOrigCmd){
55 int rc;
56 #ifdef __MINGW32__
57 /* On windows, we have to put double-quotes around the entire command.
58 ** Who knows why - this is just the way windows works.
59 */
60
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -49,11 +49,11 @@
49 }
50
51 /*
52 ** This function implements a cross-platform "system()" interface.
53 */
54 int portable_system(const char *zOrigCmd){
55 int rc;
56 #ifdef __MINGW32__
57 /* On windows, we have to put double-quotes around the entire command.
58 ** Who knows why - this is just the way windows works.
59 */
60
+3 -3
--- src/winhttp.c
+++ src/winhttp.c
@@ -137,13 +137,13 @@
137137
** Start a listening socket and process incoming HTTP requests on
138138
** that socket.
139139
*/
140140
void win32_http_server(
141141
int mnPort, int mxPort, /* Range of allowed TCP port numbers */
142
- char *zBrowser, /* Command to launch browser. (Or NULL) */
143
- char *zStopper, /* Stop server when this file is exists (Or NULL) */
144
- char *zNotFound /* The --notfound option, or NULL */
142
+ const char *zBrowser, /* Command to launch browser. (Or NULL) */
143
+ const char *zStopper, /* Stop server when this file is exists (Or NULL) */
144
+ const char *zNotFound /* The --notfound option, or NULL */
145145
){
146146
WSADATA wd;
147147
SOCKET s = INVALID_SOCKET;
148148
SOCKADDR_IN addr;
149149
int idCnt = 0;
150150
--- src/winhttp.c
+++ src/winhttp.c
@@ -137,13 +137,13 @@
137 ** Start a listening socket and process incoming HTTP requests on
138 ** that socket.
139 */
140 void win32_http_server(
141 int mnPort, int mxPort, /* Range of allowed TCP port numbers */
142 char *zBrowser, /* Command to launch browser. (Or NULL) */
143 char *zStopper, /* Stop server when this file is exists (Or NULL) */
144 char *zNotFound /* The --notfound option, or NULL */
145 ){
146 WSADATA wd;
147 SOCKET s = INVALID_SOCKET;
148 SOCKADDR_IN addr;
149 int idCnt = 0;
150
--- src/winhttp.c
+++ src/winhttp.c
@@ -137,13 +137,13 @@
137 ** Start a listening socket and process incoming HTTP requests on
138 ** that socket.
139 */
140 void win32_http_server(
141 int mnPort, int mxPort, /* Range of allowed TCP port numbers */
142 const char *zBrowser, /* Command to launch browser. (Or NULL) */
143 const char *zStopper, /* Stop server when this file is exists (Or NULL) */
144 const char *zNotFound /* The --notfound option, or NULL */
145 ){
146 WSADATA wd;
147 SOCKET s = INVALID_SOCKET;
148 SOCKADDR_IN addr;
149 int idCnt = 0;
150

Keyboard Shortcuts

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