chrt: silence analyzer warning

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>
This commit is contained in:
Bernhard Reutner-Fischer 2021-10-10 10:19:08 +02:00
parent d8e39b5917
commit 376b2ceff6

View File

@ -93,7 +93,7 @@ int chrt_main(int argc UNUSED_PARAM, char **argv)
unsigned opt; unsigned opt;
struct sched_param sp; struct sched_param sp;
char *pid_str; char *pid_str;
char *priority = priority; /* for compiler */ char *priority = NULL;
const char *current_new; const char *current_new;
int policy = SCHED_RR; int policy = SCHED_RR;
int ret; int ret;