commit 2073929621ed25546dd60cf4249adb04505ba6d5
parent 6617d5ae15cf8b26bc718927d1b79876e9bea269
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 6 Feb 2022 00:23:21 +0100
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.
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git 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