diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2026-02-15 14:41:20 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2026-02-15 15:15:30 +0100 |
| commit | b668e52c906b664b353d5a99cfa3ff36f73b341d (patch) | |
| tree | 85ab744c5dd15c21633b89a518ff001225c98494 /procps | |
| parent | 9e8f8a196838b63acdbd2c9b48a2a333bc885e8b (diff) | |
| download | busybox-w32-b668e52c906b664b353d5a99cfa3ff36f73b341d.tar.gz busybox-w32-b668e52c906b664b353d5a99cfa3ff36f73b341d.tar.bz2 busybox-w32-b668e52c906b664b353d5a99cfa3ff36f73b341d.zip | |
*: placate warnings where strchr/strstr returns constant pointer
Newer glibc is now smarter and can propagate const-ness from those!
function old new delta
readtoken1 3111 3108 -3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps')
| -rw-r--r-- | procps/nmeter.c | 5 | ||||
| -rw-r--r-- | procps/powertop.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/procps/nmeter.c b/procps/nmeter.c index dca07eac6..fd8907aac 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c | |||
| @@ -913,7 +913,8 @@ int nmeter_main(int argc UNUSED_PARAM, char **argv) | |||
| 913 | // parameters as seen by e.g. ps. Making a copy... | 913 | // parameters as seen by e.g. ps. Making a copy... |
| 914 | cur = xstrdup(argv[0]); | 914 | cur = xstrdup(argv[0]); |
| 915 | while (1) { | 915 | while (1) { |
| 916 | char *param, *p; | 916 | char *param; |
| 917 | const char *p; | ||
| 917 | prev = cur; | 918 | prev = cur; |
| 918 | again: | 919 | again: |
| 919 | cur = strchr(cur, '%'); | 920 | cur = strchr(cur, '%'); |
| @@ -929,7 +930,7 @@ int nmeter_main(int argc UNUSED_PARAM, char **argv) | |||
| 929 | // format: %[foptstring] | 930 | // format: %[foptstring] |
| 930 | cur++; | 931 | cur++; |
| 931 | p = strchr(options, cur[0]); | 932 | p = strchr(options, cur[0]); |
| 932 | param = cur+1; | 933 | param = cur + 1; |
| 933 | while (cur[0] != ']') { | 934 | while (cur[0] != ']') { |
| 934 | if (!cur[0]) | 935 | if (!cur[0]) |
| 935 | bb_show_usage(); | 936 | bb_show_usage(); |
diff --git a/procps/powertop.c b/procps/powertop.c index 6fe892540..a24748efc 100644 --- a/procps/powertop.c +++ b/procps/powertop.c | |||
| @@ -238,7 +238,7 @@ static void save_line(const char *string, int count) | |||
| 238 | #if ENABLE_FEATURE_POWERTOP_PROCIRQ | 238 | #if ENABLE_FEATURE_POWERTOP_PROCIRQ |
| 239 | static int is_hpet_irq(const char *name) | 239 | static int is_hpet_irq(const char *name) |
| 240 | { | 240 | { |
| 241 | char *p; | 241 | const char *p; |
| 242 | # if BLOATY_HPET_IRQ_NUM_DETECTION | 242 | # if BLOATY_HPET_IRQ_NUM_DETECTION |
| 243 | long hpet_chan; | 243 | long hpet_chan; |
| 244 | 244 | ||
| @@ -423,7 +423,8 @@ static NOINLINE int process_timer_stats(void) | |||
| 423 | // 1, 2159 udisks-daemon hrtimer_start_range_ns (hrtimer_wakeup) | 423 | // 1, 2159 udisks-daemon hrtimer_start_range_ns (hrtimer_wakeup) |
| 424 | // 331 total events, 249.059 events/sec | 424 | // 331 total events, 249.059 events/sec |
| 425 | while (fgets(buf, sizeof(buf), fp)) { | 425 | while (fgets(buf, sizeof(buf), fp)) { |
| 426 | const char *count, *process, *func; | 426 | const char *process, *func; |
| 427 | char *count; | ||
| 427 | char *p; | 428 | char *p; |
| 428 | int idx; | 429 | int idx; |
| 429 | unsigned cnt; | 430 | unsigned cnt; |
