* [KJ] [PATCH] drivers/isdn/i4l/isdn_v110.c : fix warning
@ 2005-03-08 11:56 Christophe Lucas
2005-03-08 13:39 ` Alexey Dobriyan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christophe Lucas @ 2005-03-08 11:56 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 399 bytes --]
Description:
Fix compile warning on drivers/isdn/i4l/isdn_v110.c
It refers to:
http://developer.osdl.org/cherry/compile/2.6/linux-2.6.11.results/2.6.11.allyesconfig.bzImage.txt
drivers/isdn/i4l/isdn_v110.c: In function `isdn_v110_stat_callback':
drivers/isdn/i4l/isdn_v110.c:523: warning: 'ret' might be used uninitialized in this function
Signed-off-by: Christophe Lucas <clucas@rotomalug.org>
[-- Attachment #2: patch-fix-warning-isdn-i4l-isdn_v110.diff --]
[-- Type: text/plain, Size: 447 bytes --]
diff -urpN -X dontdiff linux-2.6.11-vanilla/drivers/isdn/i4l/isdn_v110.c linux-2.6.11/drivers/isdn/i4l/isdn_v110.c
--- linux-2.6.11-vanilla/drivers/isdn/i4l/isdn_v110.c 2005-03-02 08:38:33.000000000 +0100
+++ linux-2.6.11/drivers/isdn/i4l/isdn_v110.c 2005-03-08 12:37:57.000000000 +0100
@@ -520,7 +520,7 @@ isdn_v110_stat_callback(int idx, isdn_ct
{
isdn_v110_stream *v = NULL;
int i;
- int ret;
+ int ret = 0 ;
if (idx < 0)
return 0;
[-- Attachment #3: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [KJ] [PATCH] drivers/isdn/i4l/isdn_v110.c : fix warning
2005-03-08 11:56 [KJ] [PATCH] drivers/isdn/i4l/isdn_v110.c : fix warning Christophe Lucas
@ 2005-03-08 13:39 ` Alexey Dobriyan
2005-03-08 14:09 ` Christophe Lucas
2005-03-09 6:49 ` Stephen Biggs
2 siblings, 0 replies; 4+ messages in thread
From: Alexey Dobriyan @ 2005-03-08 13:39 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 824 bytes --]
On Tuesday 08 March 2005 13:56, Christophe Lucas wrote:
> Fix compile warning on drivers/isdn/i4l/isdn_v110.c
> drivers/isdn/i4l/isdn_v110.c: In function `isdn_v110_stat_callback':
> drivers/isdn/i4l/isdn_v110.c:523: warning: 'ret' might be used uninitialized in this function
> --- linux-2.6.11-vanilla/drivers/isdn/i4l/isdn_v110.c
> +++ linux-2.6.11/drivers/isdn/i4l/isdn_v110.c
> @@ -520,7 +520,7 @@ isdn_v110_stat_callback(int idx, isdn_ct
> {
> - int ret;
> + int ret = 0 ;
523 int ret;
538 for (i=0; i * v->framelen < c->parm.length; i++) {
539 if (v->skbidle > 0) {
540 v->skbidle--;
541 ret = 1;
542 } else {
543 if (v->skbuser > 0)
544 v->skbuser--;
545 ret = 0;
546 }
547 }
567 return ret;
Then we'd never know if somebody passed isdn_ctrl with parm.length == 0, right?
Alexey
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [KJ] [PATCH] drivers/isdn/i4l/isdn_v110.c : fix warning
2005-03-08 11:56 [KJ] [PATCH] drivers/isdn/i4l/isdn_v110.c : fix warning Christophe Lucas
2005-03-08 13:39 ` Alexey Dobriyan
@ 2005-03-08 14:09 ` Christophe Lucas
2005-03-09 6:49 ` Stephen Biggs
2 siblings, 0 replies; 4+ messages in thread
From: Christophe Lucas @ 2005-03-08 14:09 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 998 bytes --]
Alexey Dobriyan (adobriyan@mail.ru) wrote:
> On Tuesday 08 March 2005 13:56, Christophe Lucas wrote:
> > Fix compile warning on drivers/isdn/i4l/isdn_v110.c
>
> > drivers/isdn/i4l/isdn_v110.c: In function `isdn_v110_stat_callback':
> > drivers/isdn/i4l/isdn_v110.c:523: warning: 'ret' might be used uninitialized in this function
>
> > --- linux-2.6.11-vanilla/drivers/isdn/i4l/isdn_v110.c
> > +++ linux-2.6.11/drivers/isdn/i4l/isdn_v110.c
> > @@ -520,7 +520,7 @@ isdn_v110_stat_callback(int idx, isdn_ct
> > {
>
> > - int ret;
> > + int ret = 0 ;
>
> 523 int ret;
>
> 538 for (i=0; i * v->framelen < c->parm.length; i++) {
> 539 if (v->skbidle > 0) {
> 540 v->skbidle--;
> 541 ret = 1;
> 542 } else {
> 543 if (v->skbuser > 0)
> 544 v->skbuser--;
> 545 ret = 0;
> 546 }
> 547 }
>
> 567 return ret;
>
> Then we'd never know if somebody passed isdn_ctrl with parm.length == 0, right?
Yes it is. If parm.length == 0 , we return garbage, right ?
--
~Christophe
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [KJ] [PATCH] drivers/isdn/i4l/isdn_v110.c : fix warning
2005-03-08 11:56 [KJ] [PATCH] drivers/isdn/i4l/isdn_v110.c : fix warning Christophe Lucas
2005-03-08 13:39 ` Alexey Dobriyan
2005-03-08 14:09 ` Christophe Lucas
@ 2005-03-09 6:49 ` Stephen Biggs
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Biggs @ 2005-03-09 6:49 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 669 bytes --]
I submitted just this patch (as part of a complete warning cleanup in
the drivers/isdn/i4l/* directory on 15 Feb 2005:
http://lists.osdl.org/pipermail/kernel-janitors/2005-February/003536.html
On 8 Mar 2005 at 12:56, Christophe Lucas wrote:
> Description:
> Fix compile warning on drivers/isdn/i4l/isdn_v110.c
>
>
> It refers to:
> http://developer.osdl.org/cherry/compile/2.6/linux-2.6.11.results/2.6.11.allyesconfig.bzImage.txt
> drivers/isdn/i4l/isdn_v110.c: In function `isdn_v110_stat_callback':
> drivers/isdn/i4l/isdn_v110.c:523: warning: 'ret' might be used uninitialized in this function
>
> Signed-off-by: Christophe Lucas <clucas@rotomalug.org>
>
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-03-09 6:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-08 11:56 [KJ] [PATCH] drivers/isdn/i4l/isdn_v110.c : fix warning Christophe Lucas
2005-03-08 13:39 ` Alexey Dobriyan
2005-03-08 14:09 ` Christophe Lucas
2005-03-09 6:49 ` Stephen Biggs
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.