Fossil SCM
Fix harmless compiler warning in popen2().
Commit
07e092ab3950718355c38dce70736ae9f551db47b3e476362fd09e2b3dd97a77
Parent
cbf27ece6cf90c1…
1 file changed
+1
-1
+1
-1
| --- src/popen.c | ||
| +++ src/popen.c | ||
| @@ -194,11 +194,11 @@ | ||
| 194 | 194 | close(1); |
| 195 | 195 | fd = dup(pin[1]); |
| 196 | 196 | if( fd!=1 ) fossil_panic("popen() failed to open file descriptor 1"); |
| 197 | 197 | close(pin[0]); |
| 198 | 198 | close(pin[1]); |
| 199 | - close(2); dup(1); /* Redirect stderr into the stdout pipe */ | |
| 199 | + close(2); (void)dup(1); /* Redirect stderr into the stdout pipe */ | |
| 200 | 200 | if( bDirect ){ |
| 201 | 201 | execl(zCmd, zCmd, (char*)0); |
| 202 | 202 | }else{ |
| 203 | 203 | execl("/bin/sh", "/bin/sh", "-c", zCmd, (char*)0); |
| 204 | 204 | } |
| 205 | 205 |
| --- src/popen.c | |
| +++ src/popen.c | |
| @@ -194,11 +194,11 @@ | |
| 194 | close(1); |
| 195 | fd = dup(pin[1]); |
| 196 | if( fd!=1 ) fossil_panic("popen() failed to open file descriptor 1"); |
| 197 | close(pin[0]); |
| 198 | close(pin[1]); |
| 199 | close(2); dup(1); /* Redirect stderr into the stdout pipe */ |
| 200 | if( bDirect ){ |
| 201 | execl(zCmd, zCmd, (char*)0); |
| 202 | }else{ |
| 203 | execl("/bin/sh", "/bin/sh", "-c", zCmd, (char*)0); |
| 204 | } |
| 205 |
| --- src/popen.c | |
| +++ src/popen.c | |
| @@ -194,11 +194,11 @@ | |
| 194 | close(1); |
| 195 | fd = dup(pin[1]); |
| 196 | if( fd!=1 ) fossil_panic("popen() failed to open file descriptor 1"); |
| 197 | close(pin[0]); |
| 198 | close(pin[1]); |
| 199 | close(2); (void)dup(1); /* Redirect stderr into the stdout pipe */ |
| 200 | if( bDirect ){ |
| 201 | execl(zCmd, zCmd, (char*)0); |
| 202 | }else{ |
| 203 | execl("/bin/sh", "/bin/sh", "-c", zCmd, (char*)0); |
| 204 | } |
| 205 |