Fossil SCM
Fix some compiler warnings on windows.
Commit
73c24ae363ee1b2234a3e322df124577ab3c7dcf
Parent
f442eb2ae2e0ff8…
3 files changed
+4
+1
-1
+3
-3
M
src/db.c
+4
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -516,10 +516,14 @@ | ||
| 516 | 516 | z = 0; |
| 517 | 517 | } |
| 518 | 518 | db_finalize(&s); |
| 519 | 519 | return z; |
| 520 | 520 | } |
| 521 | + | |
| 522 | +#ifdef __MINGW32__ | |
| 523 | +extern char *sqlite3_win32_mbcs_to_utf8(const char*); | |
| 524 | +#endif | |
| 521 | 525 | |
| 522 | 526 | /* |
| 523 | 527 | ** Initialize a new database file with the given schema. If anything |
| 524 | 528 | ** goes wrong, call db_err() to exit. |
| 525 | 529 | */ |
| 526 | 530 |
| --- 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 @@ | ||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /* |
| 52 | 52 | ** This function implements a cross-platform "system()" interface. |
| 53 | 53 | */ |
| 54 | -int portable_system(char *zOrigCmd){ | |
| 54 | +int portable_system(const char *zOrigCmd){ | |
| 55 | 55 | int rc; |
| 56 | 56 | #ifdef __MINGW32__ |
| 57 | 57 | /* On windows, we have to put double-quotes around the entire command. |
| 58 | 58 | ** Who knows why - this is just the way windows works. |
| 59 | 59 | */ |
| 60 | 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(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 @@ | ||
| 137 | 137 | ** Start a listening socket and process incoming HTTP requests on |
| 138 | 138 | ** that socket. |
| 139 | 139 | */ |
| 140 | 140 | void win32_http_server( |
| 141 | 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 */ | |
| 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 | 145 | ){ |
| 146 | 146 | WSADATA wd; |
| 147 | 147 | SOCKET s = INVALID_SOCKET; |
| 148 | 148 | SOCKADDR_IN addr; |
| 149 | 149 | int idCnt = 0; |
| 150 | 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 | 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 |