From 500fb283e9b86a6580cedbf834aea9d7dd639a66 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Thu, 20 Aug 2020 09:35:24 +1000 Subject: Resolve compiler warnings and errors relating to the Arg union Promote the Arg union to a core data type in Object.c such that it is visible everywhere (many source files need it), and correct declarations of several functions that use it. The Process_sendSignal function is also corrected to have the expected return type (bool, not void) - an error being masked by ignoring this not-quite-harmless warning. I've also added error checking to the kill(2) call here, which was previously overlooked / missing (?). --- MainPanel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'MainPanel.c') diff --git a/MainPanel.c b/MainPanel.c index 25023367..19b09ff1 100644 --- a/MainPanel.c +++ b/MainPanel.c @@ -1,6 +1,7 @@ /* htop - ColumnsPanel.c (C) 2004-2015 Hisham H. Muhammad +(C) 2020 Red Hat, Inc. All Rights Reserved. Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ @@ -25,11 +26,6 @@ typedef struct MainPanel_ { pid_t pidSearch; } MainPanel; -typedef union { - int i; - void* v; -} Arg; - typedef bool(*MainPanel_ForeachProcessFn)(Process*, Arg); #define MainPanel_getFunctionBar(this_) (((Panel*)(this_))->defaultBar) -- cgit v1.2.3