Fossil SCM

compile warning fixes (uninitialized vars)

ron 2010-08-31 05:12 trunk
Commit 3c326ea4ded153bf2e825cd18bfc5cb243cb93cf
3 files changed +1 -1 +1 -1 +3
+1 -1
--- src/popen.c
+++ src/popen.c
@@ -96,11 +96,11 @@
9696
*/
9797
int popen2(const char *zCmd, int *pfdIn, FILE **ppOut, int *pChildPid){
9898
#ifdef _WIN32
9999
HANDLE hStdinRd, hStdinWr, hStdoutRd, hStdoutWr, hStderr;
100100
SECURITY_ATTRIBUTES saAttr;
101
- DWORD childPid;
101
+ DWORD childPid = 0;
102102
int fd;
103103
104104
saAttr.nLength = sizeof(saAttr);
105105
saAttr.bInheritHandle = TRUE;
106106
saAttr.lpSecurityDescriptor = NULL;
107107
--- 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
+1 -1
--- src/th.c
+++ src/th.c
@@ -846,11 +846,11 @@
846846
847847
/* Gobble up input a word at a time until the end of the command
848848
** (a semi-colon or end of line).
849849
*/
850850
while( rc==TH_OK && *zInput!=';' && !thEndOfLine(zInput, nInput) ){
851
- int nWord;
851
+ int nWord=0;
852852
thNextSpace(interp, zInput, nInput, &nSpace);
853853
rc = thNextWord(interp, &zInput[nSpace], nInput-nSpace, &nWord, 1);
854854
zInput += (nSpace+nWord);
855855
nInput -= (nSpace+nWord);
856856
}
857857
--- 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 @@
4040
}
4141
blob_append(pBlob, z, -1);
4242
}
4343
4444
#if defined(_WIN32)
45
+#ifdef __MINGW32__
46
+#include <conio.h>
47
+#endif
4548
/*
4649
** getpass for Windows
4750
*/
4851
static char *getpass(const char *prompt){
4952
static char pwd[64];
5053
--- 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

Keyboard Shortcuts

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