Commit 920aa3a
selftests: cachestat: Fix warning on declaration under label
Fix warning caused from declaration under a case label. The proper way
is to declare variable at the beginning of the function. The warning
came from running clang using LLVM=1; and is as follows:
-test_cachestat.c:260:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
260 | char *map = mmap(NULL, filesize, PROT_READ | PROT_WRITE,
|
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sidharth Seela <[email protected]>
Reviewed-by: SeongJae Park <[email protected]>
Reviewed-by: wang lian <[email protected]>
Reviewed-by: Dev Jain <[email protected]>
Acked-by: Shuah Khan <[email protected]>
Acked-by: Nhat Pham <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>1 parent b90cafb commit 920aa3a
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
0 commit comments