Fossil SCM
compile warning fixes (uninitialized vars)
Commit
3c326ea4ded153bf2e825cd18bfc5cb243cb93cf
Parent
d2ba02e16f1f854…
3 files changed
+1
-1
+1
-1
+3
+1
-1
| --- src/popen.c | ||
| +++ src/popen.c | ||
| @@ -96,11 +96,11 @@ | ||
| 96 | 96 | */ |
| 97 | 97 | int popen2(const char *zCmd, int *pfdIn, FILE **ppOut, int *pChildPid){ |
| 98 | 98 | #ifdef _WIN32 |
| 99 | 99 | HANDLE hStdinRd, hStdinWr, hStdoutRd, hStdoutWr, hStderr; |
| 100 | 100 | SECURITY_ATTRIBUTES saAttr; |
| 101 | - DWORD childPid; | |
| 101 | + DWORD childPid = 0; | |
| 102 | 102 | int fd; |
| 103 | 103 | |
| 104 | 104 | saAttr.nLength = sizeof(saAttr); |
| 105 | 105 | saAttr.bInheritHandle = TRUE; |
| 106 | 106 | saAttr.lpSecurityDescriptor = NULL; |
| 107 | 107 |
| --- src/popen.c | |
| +++ src/popen.c | |
| @@ -96,11 +96,11 @@ | |
| 96 | */ |
| 97 | int popen2(const char *zCmd, int *pfdIn, FILE **ppOut, int *pChildPid){ |
| 98 | #ifdef _WIN32 |
| 99 | HANDLE hStdinRd, hStdinWr, hStdoutRd, hStdoutWr, hStderr; |
| 100 | SECURITY_ATTRIBUTES saAttr; |
| 101 | DWORD childPid; |
| 102 | int fd; |
| 103 | |
| 104 | saAttr.nLength = sizeof(saAttr); |
| 105 | saAttr.bInheritHandle = TRUE; |
| 106 | saAttr.lpSecurityDescriptor = NULL; |
| 107 |
| --- src/popen.c | |
| +++ src/popen.c | |
| @@ -96,11 +96,11 @@ | |
| 96 | */ |
| 97 | int popen2(const char *zCmd, int *pfdIn, FILE **ppOut, int *pChildPid){ |
| 98 | #ifdef _WIN32 |
| 99 | HANDLE hStdinRd, hStdinWr, hStdoutRd, hStdoutWr, hStderr; |
| 100 | SECURITY_ATTRIBUTES saAttr; |
| 101 | DWORD childPid = 0; |
| 102 | int fd; |
| 103 | |
| 104 | saAttr.nLength = sizeof(saAttr); |
| 105 | saAttr.bInheritHandle = TRUE; |
| 106 | saAttr.lpSecurityDescriptor = NULL; |
| 107 |
M
src/th.c
+1
-1
| --- src/th.c | ||
| +++ src/th.c | ||
| @@ -846,11 +846,11 @@ | ||
| 846 | 846 | |
| 847 | 847 | /* Gobble up input a word at a time until the end of the command |
| 848 | 848 | ** (a semi-colon or end of line). |
| 849 | 849 | */ |
| 850 | 850 | while( rc==TH_OK && *zInput!=';' && !thEndOfLine(zInput, nInput) ){ |
| 851 | - int nWord; | |
| 851 | + int nWord=0; | |
| 852 | 852 | thNextSpace(interp, zInput, nInput, &nSpace); |
| 853 | 853 | rc = thNextWord(interp, &zInput[nSpace], nInput-nSpace, &nWord, 1); |
| 854 | 854 | zInput += (nSpace+nWord); |
| 855 | 855 | nInput -= (nSpace+nWord); |
| 856 | 856 | } |
| 857 | 857 |
| --- src/th.c | |
| +++ src/th.c | |
| @@ -846,11 +846,11 @@ | |
| 846 | |
| 847 | /* Gobble up input a word at a time until the end of the command |
| 848 | ** (a semi-colon or end of line). |
| 849 | */ |
| 850 | while( rc==TH_OK && *zInput!=';' && !thEndOfLine(zInput, nInput) ){ |
| 851 | int nWord; |
| 852 | thNextSpace(interp, zInput, nInput, &nSpace); |
| 853 | rc = thNextWord(interp, &zInput[nSpace], nInput-nSpace, &nWord, 1); |
| 854 | zInput += (nSpace+nWord); |
| 855 | nInput -= (nSpace+nWord); |
| 856 | } |
| 857 |
| --- src/th.c | |
| +++ src/th.c | |
| @@ -846,11 +846,11 @@ | |
| 846 | |
| 847 | /* Gobble up input a word at a time until the end of the command |
| 848 | ** (a semi-colon or end of line). |
| 849 | */ |
| 850 | while( rc==TH_OK && *zInput!=';' && !thEndOfLine(zInput, nInput) ){ |
| 851 | int nWord=0; |
| 852 | thNextSpace(interp, zInput, nInput, &nSpace); |
| 853 | rc = thNextWord(interp, &zInput[nSpace], nInput-nSpace, &nWord, 1); |
| 854 | zInput += (nSpace+nWord); |
| 855 | nInput -= (nSpace+nWord); |
| 856 | } |
| 857 |
+3
| --- src/user.c | ||
| +++ src/user.c | ||
| @@ -40,10 +40,13 @@ | ||
| 40 | 40 | } |
| 41 | 41 | blob_append(pBlob, z, -1); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | #if defined(_WIN32) |
| 45 | +#ifdef __MINGW32__ | |
| 46 | +#include <conio.h> | |
| 47 | +#endif | |
| 45 | 48 | /* |
| 46 | 49 | ** getpass for Windows |
| 47 | 50 | */ |
| 48 | 51 | static char *getpass(const char *prompt){ |
| 49 | 52 | static char pwd[64]; |
| 50 | 53 |
| --- src/user.c | |
| +++ src/user.c | |
| @@ -40,10 +40,13 @@ | |
| 40 | } |
| 41 | blob_append(pBlob, z, -1); |
| 42 | } |
| 43 | |
| 44 | #if defined(_WIN32) |
| 45 | /* |
| 46 | ** getpass for Windows |
| 47 | */ |
| 48 | static char *getpass(const char *prompt){ |
| 49 | static char pwd[64]; |
| 50 |
| --- src/user.c | |
| +++ src/user.c | |
| @@ -40,10 +40,13 @@ | |
| 40 | } |
| 41 | blob_append(pBlob, z, -1); |
| 42 | } |
| 43 | |
| 44 | #if defined(_WIN32) |
| 45 | #ifdef __MINGW32__ |
| 46 | #include <conio.h> |
| 47 | #endif |
| 48 | /* |
| 49 | ** getpass for Windows |
| 50 | */ |
| 51 | static char *getpass(const char *prompt){ |
| 52 | static char pwd[64]; |
| 53 |