From 2073929621ed25546dd60cf4249adb04505ba6d5 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 6 Feb 2022 00:23:21 +0100 Subject: sfeed_curses: write cmd in a more verbose way This fixes a compile error tested with HaikuOS 32-bit (gcc2h, based on gcc 2.95). It also suppresses a false-positive warning of an unused forkexec function in cppcheck. --- sfeed_curses.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sfeed_curses.c b/sfeed_curses.c index d515c4f..2167b7a 100644 --- a/sfeed_curses.c +++ b/sfeed_curses.c @@ -1414,12 +1414,14 @@ feed_plumb_selected_item(struct pane *p, int field) { struct row *row; struct item *item; + char *cmd[] = { plumbercmd, NULL, NULL }; if (!(row = pane_row_get(p, p->pos))) return; - item = row->data; markread(p, p->pos, p->pos, 1); - forkexec((char *[]) { plumbercmd, item->fields[field], NULL }, plumberia); + item = row->data; + cmd[1] = item->fields[field]; /* set first argument for plumber */ + forkexec(cmd, plumberia); } void -- cgit v1.2.3