* [PATCH] staging: binder: cmd_name must be initialised
@ 2014-09-05 16:02 Dmitry Voytik
2014-09-05 18:48 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Voytik @ 2014-09-05 16:02 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel, Dmitry Voytik
Variable cmd_name must be initialised as variable name is.
Signed-off-by: Dmitry Voytik <voytikd@gmail.com>
---
drivers/staging/android/binder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 4f34dc0..93b067f 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -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;
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: binder: cmd_name must be initialised
2014-09-05 16:02 [PATCH] staging: binder: cmd_name must be initialised Dmitry Voytik
@ 2014-09-05 18:48 ` Greg Kroah-Hartman
2014-09-08 12:42 ` Dmitry Voytik
0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2014-09-05 18:48 UTC (permalink / raw)
To: Dmitry Voytik; +Cc: linux-kernel
On Fri, Sep 05, 2014 at 08:02:24PM +0400, Dmitry Voytik wrote:
> Variable cmd_name must 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: binder: cmd_name must be initialised
2014-09-05 18:48 ` Greg Kroah-Hartman
@ 2014-09-08 12:42 ` Dmitry Voytik
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Voytik @ 2014-09-08 12:42 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel
On Fri, Sep 5, 2014 at 10:48 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Fri, Sep 05, 2014 at 08:02:24PM +0400, Dmitry Voytik wrote:
>> Variable cmd_name must 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.
> thanks,
>
> greg k-h
--
Best Regards,
Dmitry Voytik.
voytikd@gmail.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-08 12:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-05 16:02 [PATCH] staging: binder: cmd_name must be initialised Dmitry Voytik
2014-09-05 18:48 ` Greg Kroah-Hartman
2014-09-08 12:42 ` Dmitry Voytik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome