Fossil SCM

Fix harmless compiler warning in popen2().

drh 2024-02-06 11:24 trunk
Commit 07e092ab3950718355c38dce70736ae9f551db47b3e476362fd09e2b3dd97a77
1 file changed +1 -1
+1 -1
--- src/popen.c
+++ src/popen.c
@@ -194,11 +194,11 @@
194194
close(1);
195195
fd = dup(pin[1]);
196196
if( fd!=1 ) fossil_panic("popen() failed to open file descriptor 1");
197197
close(pin[0]);
198198
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 */
200200
if( bDirect ){
201201
execl(zCmd, zCmd, (char*)0);
202202
}else{
203203
execl("/bin/sh", "/bin/sh", "-c", zCmd, (char*)0);
204204
}
205205
--- 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

Keyboard Shortcuts

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