Steve Youngs <steve@xxxxxxxxxxx> writes:
> * Zajcev Evgeny <zevlg@xxxxxxxxx> writes:
>
> > Steve Youngs <steve@xxxxxxxxxxx> writes:
> >> [...not handled in switch errors...]
> >>
> >> *** I find all those "enumeration value `foo' not handled in switch"
> >> warnings very off putting. Is there something that can be done
> >> about them? Oh and I mean "fixed" not "hidden" :-P
>
> > Use -Wno-switch gcc flag.
>
> Did you notice the words `"Oh and I mean "fixed" not "hidden"'?
It is not critical thing that you ommit some cases declared in enum
type, but sometimes useful to track error when you forgot to handle
some condidion which you've declared in enum type. So -Wno-swich can
be considered as fix.
> > just change mktemp() to mkstemp() :))
>
> But what about...
>
> ,----[ Man: mktemp(3) ]
> | SYNOPSIS
> | #include <stdlib.h>
> |
> | char *mktemp(char *template);
> `----
>
> ,----[ Man: mkstemp(3) ]
> | SYNOPSIS
> | #include <stdlib.h>
> |
> | int mkstemp(char *template);
> `----
>
> ...those differences? One's a char and the other's an int. Does that
> matter?
Oops :) it matter. Actually in our case i think mktemp() is used
securely :), because it does not performe any read/write to generated
file. It only uses it to generate unique name for lock file. Just
skip this stupid warning ..
>
> > it is true: 255 can't be greater than 255.
>
> I'm sure my wife could think of a way to argue that. :-)
>
> > I believe that this patch should work:
>
> Great! Where's your repo?
hehe, at home :)
>
> OK, cool. But as a developer you should have these packages already
> installed anyway, no?
Not yet :)
--
lg
|