summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-12-19 18:10:03 +0100
committercgzones <cgzones@googlemail.com>2020-12-19 21:13:32 +0100
commitf614b8a19fe92cd13862605c16d69aa23c8b9bd1 (patch)
tree8f90a41b32acf8947b2272893e7332ebafcdee67
parentc150e4bde9080799c7c9f115565c8324faa953be (diff)
Mark Platform_defaultFields const
-rw-r--r--Settings.c2
-rw-r--r--darwin/Platform.c2
-rw-r--r--darwin/Platform.h2
-rw-r--r--dragonflybsd/Platform.c2
-rw-r--r--dragonflybsd/Platform.h2
-rw-r--r--freebsd/Platform.c2
-rw-r--r--freebsd/Platform.h2
-rw-r--r--linux/Platform.c2
-rw-r--r--linux/Platform.h2
-rw-r--r--openbsd/Platform.c2
-rw-r--r--openbsd/Platform.h2
-rw-r--r--solaris/Platform.c2
-rw-r--r--solaris/Platform.h2
-rw-r--r--unsupported/Platform.c2
-rw-r--r--unsupported/Platform.h2
15 files changed, 15 insertions, 15 deletions
diff --git a/Settings.c b/Settings.c
index 96990a83..a0d42f39 100644
--- a/Settings.c
+++ b/Settings.c
@@ -359,7 +359,7 @@ Settings* Settings_new(int initialCpuCount) {
// TODO: turn 'fields' into a Vector,
// (and ProcessFields into proper objects).
this->flags = 0;
- ProcessField* defaults = Platform_defaultFields;
+ const ProcessField* defaults = Platform_defaultFields;
for (int i = 0; defaults[i]; i++) {
this->fields[i] = defaults[i];
this->flags |= Process_fields[defaults[i]].flags;
diff --git a/darwin/Platform.c b/darwin/Platform.c
index 13ebceb1..a0ea6721 100644
--- a/darwin/Platform.c
+++ b/darwin/Platform.c
@@ -39,7 +39,7 @@ in the source distribution for its full text.
#endif
-ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
+const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
const SignalItem Platform_signals[] = {
{ .name = " 0 Cancel", .number = 0 },
diff --git a/darwin/Platform.h b/darwin/Platform.h
index 23132bb2..3e0369b8 100644
--- a/darwin/Platform.h
+++ b/darwin/Platform.h
@@ -20,7 +20,7 @@ in the source distribution for its full text.
#include "SignalsPanel.h"
-extern ProcessField Platform_defaultFields[];
+extern const ProcessField Platform_defaultFields[];
extern double Platform_timebaseToNS;
diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c
index 6f2d7bdc..8ce216c1 100644
--- a/dragonflybsd/Platform.c
+++ b/dragonflybsd/Platform.c
@@ -31,7 +31,7 @@ in the source distribution for its full text.
#include <math.h>
-ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
+const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
const SignalItem Platform_signals[] = {
{ .name = " 0 Cancel", .number = 0 },
diff --git a/dragonflybsd/Platform.h b/dragonflybsd/Platform.h
index 51d4c2cf..3c5d9cb2 100644
--- a/dragonflybsd/Platform.h
+++ b/dragonflybsd/Platform.h
@@ -18,7 +18,7 @@ in the source distribution for its full text.
#include "SignalsPanel.h"
-extern ProcessField Platform_defaultFields[];
+extern const ProcessField Platform_defaultFields[];
extern const SignalItem Platform_signals[];
diff --git a/freebsd/Platform.c b/freebsd/Platform.c
index 3cec913d..c74ab6da 100644
--- a/freebsd/Platform.c
+++ b/freebsd/Platform.c
@@ -47,7 +47,7 @@ in the source distribution for its full text.
#include "zfs/ZfsCompressedArcMeter.h"
-ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
+const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
const SignalItem Platform_signals[] = {
{ .name = " 0 Cancel", .number = 0 },
diff --git a/freebsd/Platform.h b/freebsd/Platform.h
index 793746e7..36895b81 100644
--- a/freebsd/Platform.h
+++ b/freebsd/Platform.h
@@ -19,7 +19,7 @@ in the source distribution for its full text.
#include "SignalsPanel.h"
-extern ProcessField Platform_defaultFields[];
+extern const ProcessField Platform_defaultFields[];
extern const SignalItem Platform_signals[];
diff --git a/linux/Platform.c b/linux/Platform.c
index d048a804..dd80ded7 100644
--- a/linux/Platform.c
+++ b/linux/Platform.c
@@ -65,7 +65,7 @@ in the source distribution for its full text.
#endif
-ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, M_SHARE, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
+const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, M_SHARE, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
const SignalItem Platform_signals[] = {
{ .name = " 0 Cancel", .number = 0 },
diff --git a/linux/Platform.h b/linux/Platform.h
index be0331b9..fe814484 100644
--- a/linux/Platform.h
+++ b/linux/Platform.h
@@ -18,7 +18,7 @@ in the source distribution for its full text.
#include "ProcessLocksScreen.h"
#include "SignalsPanel.h"
-extern ProcessField Platform_defaultFields[];
+extern const ProcessField Platform_defaultFields[];
extern const SignalItem Platform_signals[];
diff --git a/openbsd/Platform.c b/openbsd/Platform.c
index 30a58ec4..8ee81411 100644
--- a/openbsd/Platform.c
+++ b/openbsd/Platform.c
@@ -42,7 +42,7 @@ in the source distribution for its full text.
#include "XUtils.h"
-ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
+const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
/*
* See /usr/include/sys/signal.h
diff --git a/openbsd/Platform.h b/openbsd/Platform.h
index 4774f921..e7a59662 100644
--- a/openbsd/Platform.h
+++ b/openbsd/Platform.h
@@ -20,7 +20,7 @@ in the source distribution for its full text.
#include "SignalsPanel.h"
-extern ProcessField Platform_defaultFields[];
+extern const ProcessField Platform_defaultFields[];
/* see /usr/include/sys/signal.h */
extern const SignalItem Platform_signals[];
diff --git a/solaris/Platform.c b/solaris/Platform.c
index b674998b..09747cd4 100644
--- a/solaris/Platform.c
+++ b/solaris/Platform.c
@@ -86,7 +86,7 @@ const SignalItem Platform_signals[] = {
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
-ProcessField Platform_defaultFields[] = { PID, LWPID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
+const ProcessField Platform_defaultFields[] = { PID, LWPID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
const MeterClass* const Platform_meterTypes[] = {
&CPUMeter_class,
diff --git a/solaris/Platform.h b/solaris/Platform.h
index 4daf7164..de2b2c92 100644
--- a/solaris/Platform.h
+++ b/solaris/Platform.h
@@ -40,7 +40,7 @@ extern const SignalItem Platform_signals[];
extern const unsigned int Platform_numberOfSignals;
-extern ProcessField Platform_defaultFields[];
+extern const ProcessField Platform_defaultFields[];
extern const MeterClass* const Platform_meterTypes[];
diff --git a/unsupported/Platform.c b/unsupported/Platform.c
index b435e186..94e1b7c7 100644
--- a/unsupported/Platform.c
+++ b/unsupported/Platform.c
@@ -28,7 +28,7 @@ const SignalItem Platform_signals[] = {
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
-ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
+const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
const MeterClass* const Platform_meterTypes[] = {
&CPUMeter_class,
diff --git a/unsupported/Platform.h b/unsupported/Platform.h
index 5f777381..4254122e 100644
--- a/unsupported/Platform.h
+++ b/unsupported/Platform.h
@@ -19,7 +19,7 @@ extern const SignalItem Platform_signals[];
extern const unsigned int Platform_numberOfSignals;
-extern ProcessField Platform_defaultFields[];
+extern const ProcessField Platform_defaultFields[];
extern const MeterClass* const Platform_meterTypes[];

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