From f614b8a19fe92cd13862605c16d69aa23c8b9bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sat, 19 Dec 2020 18:10:03 +0100 Subject: Mark Platform_defaultFields const --- Settings.c | 2 +- darwin/Platform.c | 2 +- darwin/Platform.h | 2 +- dragonflybsd/Platform.c | 2 +- dragonflybsd/Platform.h | 2 +- freebsd/Platform.c | 2 +- freebsd/Platform.h | 2 +- linux/Platform.c | 2 +- linux/Platform.h | 2 +- openbsd/Platform.c | 2 +- openbsd/Platform.h | 2 +- solaris/Platform.c | 2 +- solaris/Platform.h | 2 +- unsupported/Platform.c | 2 +- unsupported/Platform.h | 2 +- 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 -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[]; -- cgit v1.2.3