staging: binder: cmd_name must be initialised
PATCH 1/1 staging: binder: cmd_name must be initialised
Variable cmd_name must be initialised as variable name is.
--- drivers/staging/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/binder.c +1 -1
@@ -2233,7 +2233,7 @@ retry:case BINDER_WORK_NODE : { struct binder_node *node = container_of(w, struct binder_node, work);uint32_t cmd =BR_NOOP ; -const char *cmd_name; +const char *cmd_name ="BR_NOOP" ;int strong = node->internal_strong_refs || node->local_strong_refs;int weak = !hlist_empty (&node->refs) || node->local_weak_refs || strong;
Signature · 1 line
1.9.1
Greg Kroah-Hartman
maintainerQuoted 1 line · Dmitry Voytik
Variable
cmd_namemust be initialised as variable name is.
Why? What bug does this fix? Have you tested this change? Does this cause binder to now act differently than before?
thanks,
greg k-h
Quoted 5 lines · Greg Kroah-Hartman
Quoted 1 line · Dmitry Voytik
Variable
cmd_namemust be initialised as variable name is.Why? What bug does this fix? Have you tested this change? Does this cause binder to now act differently than before?
Hi Greg,
Thank you for your time.
The intent was to eliminate the GCC warning:
/scratch/kisskb/src/drivers/staging/android/binder.c: warning:
'cmd_name' may be used uninitialized in this function [-Wuninitialized]: => 2275:5
But now after carefull review of the sorce code I've understood that this is a false positive.
Sorry for bothering.
Quoted 3 lines
thanks,
greg k-h
Signature · 3 lines
Best Regards, Dmitry Voytik. [email protected]