summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2022-02-06 00:23:21 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2022-02-06 00:54:23 +0100
commit2073929621ed25546dd60cf4249adb04505ba6d5 (patch)
tree52ab8ad4aab78f29688e6e5bf9cc4c3809705cb5
parent6617d5ae15cf8b26bc718927d1b79876e9bea269 (diff)
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.
-rw-r--r--sfeed_curses.c6
1 files 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