Without this patch, pedantic C compilers will choke with messages
like:
ipc/src/subprocess.c:71:5: error: ISO C90 forbids mixed declarations and code
[-Werror=pedantic]
int countFd = 0;
^
ipc/src/subprocess.c:91:5: error: ISO C90 forbids mixed declarations and code
[-Werror=pedantic]
int i;
^
ipc/src/subprocess.c:60:15: error: unused variable ‘fd’
[-Werror=unused-variable]
int *const *fd;
^
cc1: all warnings being treated as errors
make: *** [ipc/src/subprocess.o] Error 1
---
ipc/src/subprocess.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/ipc/src/subprocess.c b/ipc/src/subprocess.c
index 92d20b5..5343120 100644
--- a/ipc/src/subprocess.c
+++ b/ipc/src/subprocess.c
@@ -57,10 +57,11 @@ pid_t launchProcess(const char *path,
pid_t pid;
int mergeStderr = (fd_err ? 0 : 1);
- int *const *fd;
pid = fork();
if (pid == 0) {
+ int countFd = 0;
+ int i;
/* child */
if (workdir) {
if (chdir(workdir) < 0) {
@@ -68,7 +69,6 @@ pid_t launchProcess(const char *path,
}
}
- int countFd = 0;
while (dupFds[countFd] > 0) {
++countFd;
}
@@ -87,13 +87,10 @@ pid_t launchProcess(const char *path,
dup(mergeStderr ? fd_out[1] : fd_err[1]);
-
- int i;
for (i=0; i<countFd; i++) {
dup2(dupFds[i], 3 + i);
}
-
execve(path, argv, envp);
_exit(1);
}
--
1.8.5.1
_______________________________________________
enigmail-users mailing list
[email protected]
https://admin.hostpoint.ch/mailman/listinfo/enigmail-users_enigmail.net