On Mon, 23 Nov 2009 15:24:46 +0100, Jed Brown wrote:
> >From the gcc man page:
>
>-Wunused-value
>Warn whenever a statement computes a result that is explicitly
>not used. To suppress this warning cast the unused expression
>to void. This includes an ex
On Mon, 23 Nov 2009 15:24:46 +0100, Jed Brown wrote:
> >From the gcc man page:
>
>-Wunused-value
>Warn whenever a statement computes a result that is explicitly
>not used. To suppress this warning cast the unused expression
>to void. This includes an ex
Hi Jed,
On Mon, Nov 23, 2009 at 4:24 PM, Jed Brown wrote:
>
>
> But I'm confused here because I don't currently see any warnings with
> gcc-4.4.2. Actually this must be a bug because I get no warnings for
> the blatantly unused
>
> malloc(5);
>
Did you try it with -O2? Without optimizations m
On Mon, 23 Nov 2009 18:14:12 +0200, Dirk-Jan Binnema
wrote:
> Did you try it with -O2? Without optimizations many of the warnings are not
> issued.
Yes,
$ cat > foo.c
#include
#include
int main()
{
malloc(5);
write(2,0,10);
return 0;
}
$ gcc -static -std=c89 -O0 -Wall -Wextra -pedantic
On Mon, 23 Nov 2009 14:19:18 +0100, Karl Wiberg wrote:
> On Mon, Nov 23, 2009 at 12:11 PM, Dirk-Jan Binnema
> wrote:
>
> > On Mon, Nov 23, 2009 at 9:34 AM, Karl Wiberg wrote:
> >
> > > Didn't the "(void)" suggestion work?
> >
> > I actually preferred that solution, but unfortunately, it didn't
On Mon, Nov 23, 2009 at 12:11 PM, Dirk-Jan Binnema
wrote:
> On Mon, Nov 23, 2009 at 9:34 AM, Karl Wiberg wrote:
>
> > Didn't the "(void)" suggestion work?
>
> I actually preferred that solution, but unfortunately, it didn't
> stop gcc from complaining...
Hmpf. I'd argue that that's a gcc bug,
On Mon, Nov 23, 2009 at 9:34 AM, Karl Wiberg wrote:
> On Mon, Nov 23, 2009 at 7:20 AM, Dirk-Jan C. Binnema
> wrote:
>
> > +ssize_t ignored;
> > static char msg[] = "Stopping... \n";
> > -write(2, msg, sizeof(msg)-1);
> > +
> > +ignored = write(2, msg, sizeof(msg)-1);
> >
On Mon, Nov 23, 2009 at 7:20 AM, Dirk-Jan C. Binnema
wrote:
> + ? ?ssize_t ignored;
> ? ? static char msg[] = "Stopping... ? ? ? ? \n";
> - ? ?write(2, msg, sizeof(msg)-1);
> +
> + ? ?ignored = write(2, msg, sizeof(msg)-1);
> ? ? interrupted = 1;
> ?}
Didn't the "(void)" suggestion work?
--
Ka
From: Dirk-Jan C. Binnema
Date: Mon, 23 Nov 2009 08:03:35 +0200
---
notmuch-new.c |4 +++-
notmuch-tag.c |4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/notmuch-new.c b/notmuch-new.c
index a2b30bd..3d04efa 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -35,8 +