diff options
| author | Sun Haiyong <[email protected]> | 2023-12-04 08:20:55 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2024-01-26 15:06:12 +0000 |
| commit | 79baac8acfc60a7a5114f6d60731e28c242ef8ce (patch) | |
| tree | 541661276330d1636506513ab6de6d326910bf98 /scripts/generate_rust_target.rs | |
| parent | perf build: Make minimal shellcheck version to v0.6.0 (diff) | |
| download | kernel-79baac8acfc60a7a5114f6d60731e28c242ef8ce.tar.gz kernel-79baac8acfc60a7a5114f6d60731e28c242ef8ce.zip | |
perf top: Remove needless malloc(0) call that triggers -Walloc-size
GCC 14 introduces a new -Walloc-size included in -Wextra which errors out
like:
builtin-top.c: In function ‘prompt_integer’:
builtin-top.c:360:21: error: allocation of insufficient size ‘0’ for
type ‘char’ with size ‘1’ [-Werror=alloc-size]
360 | char *buf = malloc(0), *p;
| ^~~~~~
Just set it to NULL, getline() will do the allocation.
Signed-off-by: Sun Haiyong <[email protected]>
Signed-off-by: Yanteng Si <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'scripts/generate_rust_target.rs')
0 files changed, 0 insertions, 0 deletions
