summaryrefslogtreecommitdiffstats
path: root/MainPanel.h
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2020-08-20 09:35:24 +1000
committerNathan Scott <nathans@redhat.com>2020-08-20 09:35:33 +1000
commit500fb283e9b86a6580cedbf834aea9d7dd639a66 (patch)
tree52c0df7aa5178887f14e48fc40c1dc45a8530dfc /MainPanel.h
parent5228f5d47a10d9194297a31bf4cf7dbbade6c868 (diff)
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 (?).
Diffstat (limited to 'MainPanel.h')
-rw-r--r--MainPanel.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/MainPanel.h b/MainPanel.h
index 8d753306..6162d8e9 100644
--- a/MainPanel.h
+++ b/MainPanel.h
@@ -5,6 +5,7 @@
/*
htop - ColumnsPanel.h
(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.
*/
@@ -21,11 +22,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)

© 2014-2024 Faster IT GmbH | imprint | privacy policy