From: Matthew Fernandez Date: Sat, 5 Mar 2022 18:27:55 +0000 (-0800) Subject: Xlib plugin: remove unused 'err' variable X-Git-Tag: 4.0.0~193^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18b449e5a4648b615d99ff568d00866db28df4b5;p=graphviz Xlib plugin: remove unused 'err' variable The return value of `execvp` is irrelevant because this function only ever returns when it fails. In this situation, the failure cause is in the `errno` global, not in the return value. --- diff --git a/plugin/xlib/gvdevice_xlib.c b/plugin/xlib/gvdevice_xlib.c index 1ed26503f..13a2d3989 100644 --- a/plugin/xlib/gvdevice_xlib.c +++ b/plugin/xlib/gvdevice_xlib.c @@ -148,7 +148,6 @@ static void browser_show(GVJ_t *job) #if defined HAVE_SYS_TYPES_H && defined HAVE_UNISTD_H char *exec_argv[3] = {BROWSER, NULL, NULL}; pid_t pid; - int err; exec_argv[1] = job->selected_href; @@ -157,7 +156,7 @@ static void browser_show(GVJ_t *job) fprintf(stderr,"fork failed: %s\n", strerror(errno)); } else if (pid == 0) { - err = execvp(exec_argv[0], exec_argv); + execvp(exec_argv[0], exec_argv); fprintf(stderr,"error starting %s: %s\n", exec_argv[0], strerror(errno)); } #else