On Thu, Sep 18, 2014 at 05:30:55PM -0700, Jason Gerecke wrote:
[...]
> >> diff --git a/tools/isdv4-serial-debugger.c b/tools/isdv4-serial-debugger.c
> >> index 6629cb6..03abd26 100644
> >> --- a/tools/isdv4-serial-debugger.c
> >> +++ b/tools/isdv4-serial-debugger.c
> >> @@ -40,6 +40,7 @@
> >>
> >>  #include "tools-shared.h"
> >>
> >> +extern int verbose;
> >>  int verbose = 0;
> >>
> >>  static void usage(void)
> >> diff --git a/tools/isdv4-serial-inputattach.c 
> >> b/tools/isdv4-serial-inputattach.c
> >> index fedfce4..6003d30 100644
> >> --- a/tools/isdv4-serial-inputattach.c
> >> +++ b/tools/isdv4-serial-inputattach.c
> >> @@ -37,7 +37,8 @@
> >>
> >>  #include "tools-shared.h"
> >>
> >> -int verbose;
> >> +extern int verbose;
> >> +int verbose = 0;
> >
> > that doesn't look right.
> >
> > Acked-by: Peter Hutterer <peter.hutte...@who-t.net>
> > for the series otherwise
> >
> >
> > Cheers,
> >    Peter
> >
> 
> Can you go into a bit more detail? From what I understand, the
> language already guarantees that a file-scope variable is visible
> extern and initialized to zero. The code relies on that behavior as
> well, as its referenced by tools-shared.c and is expected to be zero
> by default. Really, this and the similar hunk for isdv4-serial-debug.c
> are just to shut up to checker (which I'm aware isn't always a sane
> idea, but seemed fine in this instance).

I was mostly referring to declaring it as extern just before initializing it
right there. Dropping the extern line should work, or does that cause some
other warning?

Cheers,
   Peter
 

------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to