[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH 1/1] chrt: silence analyzer warning
From: Bernhard Reutner-Fischer <rep.dot.nop () gmail ! com>
Date: 2021-10-10 8:27:31
Message-ID: 20211010082731.41293-2-rep.dot.nop () gmail ! com
[Download RAW message or body]
warning: use of uninitialized value ‘priority' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
chrt_main 499 496 -3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-3) Total: -3 bytes
text data bss dec hex filename
972157 4235 1840 978232 eed38 busybox_old
972154 4235 1840 978229 eed35 busybox_unstripped
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
util-linux/chrt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util-linux/chrt.c b/util-linux/chrt.c
index a8701b55f..6799abb2d 100644
--- a/util-linux/chrt.c
+++ b/util-linux/chrt.c
@@ -93,7 +93,7 @@ int chrt_main(int argc UNUSED_PARAM, char **argv)
unsigned opt;
struct sched_param sp;
char *pid_str;
- char *priority = priority; /* for compiler */
+ char *priority = NULL;
const char *current_new;
int policy = SCHED_RR;
int ret;
--
2.33.0
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic