LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* latest commit on thinkpad_acpi.c 6c231bd5eb07 shows warning
@ 2008-02-24 22:07 Zdenek Kabelac
  2008-02-25 18:27 ` Henrique de Moraes Holschuh
  2008-02-25 19:01 ` Henrique de Moraes Holschuh
  0 siblings, 2 replies; 4+ messages in thread
From: Zdenek Kabelac @ 2008-02-24 22:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: hmh, len.brown

Hi

Commit 6c231bd5eb07ce546517019f334652b9ecfc329a
generate this warning:

drivers/misc/thinkpad_acpi.c: In function 'tpacpi_input_send_tabletsw':
include/linux/input.h:1290: warning: 'state' is used uninitialized in
this function
drivers/misc/thinkpad_acpi.c:1191: note: 'state' was declared here
drivers/misc/thinkpad_acpi.c: In function 'hotkey_tablet_mode_show':
drivers/misc/thinkpad_acpi.c:1723: warning: 's' is used uninitialized
in this function

I assume typo  here thinkpad_acpi.c:10724 hotkey_get_tablet_mode
where status should be maybe 's' and local 's' shouldn't be defined at
all -  just guess?

Zdenek

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: latest commit on thinkpad_acpi.c 6c231bd5eb07 shows warning
  2008-02-24 22:07 latest commit on thinkpad_acpi.c 6c231bd5eb07 shows warning Zdenek Kabelac
@ 2008-02-25 18:27 ` Henrique de Moraes Holschuh
  2008-02-25 19:01 ` Henrique de Moraes Holschuh
  1 sibling, 0 replies; 4+ messages in thread
From: Henrique de Moraes Holschuh @ 2008-02-25 18:27 UTC (permalink / raw)
  To: Zdenek Kabelac; +Cc: linux-kernel, len.brown

On Sun, 24 Feb 2008, Zdenek Kabelac wrote:
> Commit 6c231bd5eb07ce546517019f334652b9ecfc329a
> generate this warning:
> 
> drivers/misc/thinkpad_acpi.c: In function 'tpacpi_input_send_tabletsw':
> include/linux/input.h:1290: warning: 'state' is used uninitialized in
> this function
> drivers/misc/thinkpad_acpi.c:1191: note: 'state' was declared here
> drivers/misc/thinkpad_acpi.c: In function 'hotkey_tablet_mode_show':
> drivers/misc/thinkpad_acpi.c:1723: warning: 's' is used uninitialized
> in this function
> 
> I assume typo  here thinkpad_acpi.c:10724 hotkey_get_tablet_mode
> where status should be maybe 's' and local 's' shouldn't be defined at
> all -  just guess?

Erk.  Looks like I tested one branch and did a git-send-email on the other
or something equally pathetic.  Sorry about that.

I will check the entire thing over line by line and send a fix.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: latest commit on thinkpad_acpi.c 6c231bd5eb07 shows warning
  2008-02-24 22:07 latest commit on thinkpad_acpi.c 6c231bd5eb07 shows warning Zdenek Kabelac
  2008-02-25 18:27 ` Henrique de Moraes Holschuh
@ 2008-02-25 19:01 ` Henrique de Moraes Holschuh
  2008-02-25 19:11   ` Zdenek Kabelac
  1 sibling, 1 reply; 4+ messages in thread
From: Henrique de Moraes Holschuh @ 2008-02-25 19:01 UTC (permalink / raw)
  To: Zdenek Kabelac; +Cc: linux-kernel, len.brown

On Sun, 24 Feb 2008, Zdenek Kabelac wrote:
> Commit 6c231bd5eb07ce546517019f334652b9ecfc329a
> generate this warning:
> 
> drivers/misc/thinkpad_acpi.c: In function 'tpacpi_input_send_tabletsw':
> include/linux/input.h:1290: warning: 'state' is used uninitialized in
> this function
> drivers/misc/thinkpad_acpi.c:1191: note: 'state' was declared here
> drivers/misc/thinkpad_acpi.c: In function 'hotkey_tablet_mode_show':
> drivers/misc/thinkpad_acpi.c:1723: warning: 's' is used uninitialized
> in this function

I can't seem to get these warnings in Debian gcc 4.2.3-1.  But the code is
broken alright.  I will send in a fix in a short while, as it will take a
small while to make sure there is nothing else wrong before I send in the
fix.   I have to figure out how the heck that got past the testing in the
first place, as well...

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: latest commit on thinkpad_acpi.c 6c231bd5eb07 shows warning
  2008-02-25 19:01 ` Henrique de Moraes Holschuh
@ 2008-02-25 19:11   ` Zdenek Kabelac
  0 siblings, 0 replies; 4+ messages in thread
From: Zdenek Kabelac @ 2008-02-25 19:11 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh; +Cc: linux-kernel, len.brown

2008/2/25, Henrique de Moraes Holschuh <hmh@hmh.eng.br>:
> On Sun, 24 Feb 2008, Zdenek Kabelac wrote:
>
> > Commit 6c231bd5eb07ce546517019f334652b9ecfc329a
>  > generate this warning:
>  >
>  > drivers/misc/thinkpad_acpi.c: In function 'tpacpi_input_send_tabletsw':
>  > include/linux/input.h:1290: warning: 'state' is used uninitialized in
>  > this function
>  > drivers/misc/thinkpad_acpi.c:1191: note: 'state' was declared here
>  > drivers/misc/thinkpad_acpi.c: In function 'hotkey_tablet_mode_show':
>  > drivers/misc/thinkpad_acpi.c:1723: warning: 's' is used uninitialized
>  > in this function
>
>
> I can't seem to get these warnings in Debian gcc 4.2.3-1.  But the code is
>  broken alright.  I will send in a fix in a short while, as it will take a
>  small while to make sure there is nothing else wrong before I send in the
>  fix.   I have to figure out how the heck that got past the testing in the
>  first place, as well...

Try gcc-4.3  (or gcc-snapshot) - makes much better/deeper code analysis.

Zdenek

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-25 19:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-24 22:07 latest commit on thinkpad_acpi.c 6c231bd5eb07 shows warning Zdenek Kabelac
2008-02-25 18:27 ` Henrique de Moraes Holschuh
2008-02-25 19:01 ` Henrique de Moraes Holschuh
2008-02-25 19:11   ` Zdenek Kabelac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).