* [PATCH] notmuch: Quiet buildbot warnings.
@ 2011-12-20 15:20 David Edmondson
2011-12-21 12:16 ` David Bremner
2011-12-21 22:06 ` Thomas Jost
0 siblings, 2 replies; 5+ messages in thread
From: David Edmondson @ 2011-12-20 15:20 UTC (permalink / raw)
To: notmuch
Cast away the result of various *write functions. Provide a default
value for some variables to avoid "use before set" warnings.
---
The buildbot complains about these, though my own system (Debian
testing on amd64) does not.
lib/database.cc | 2 +-
notmuch-new.c | 2 +-
notmuch-show.c | 2 +-
notmuch-tag.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/database.cc b/lib/database.cc
index 98f101e..f1a9dc2 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -1447,7 +1447,7 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch,
keys = g_hash_table_get_keys (parents);
for (l = keys; l; l = l->next) {
char *parent_message_id;
- const char *parent_thread_id;
+ const char *parent_thread_id = NULL;
parent_message_id = (char *) l->data;
diff --git a/notmuch-new.c b/notmuch-new.c
index bfb4600..3512de7 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -67,7 +67,7 @@ handle_sigint (unused (int sig))
{
static char msg[] = "Stopping... \n";
- write(2, msg, sizeof(msg)-1);
+ (void) write(2, msg, sizeof(msg)-1);
interrupted = 1;
}
diff --git a/notmuch-show.c b/notmuch-show.c
index 8da3295..19fb49f 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -866,7 +866,7 @@ do_show_single (void *ctx,
while (!feof (file)) {
size = fread (buf, 1, sizeof (buf), file);
- fwrite (buf, size, 1, stdout);
+ (void) fwrite (buf, size, 1, stdout);
}
fclose (file);
diff --git a/notmuch-tag.c b/notmuch-tag.c
index 537d5a4..292c5da 100644
--- a/notmuch-tag.c
+++ b/notmuch-tag.c
@@ -26,7 +26,7 @@ static void
handle_sigint (unused (int sig))
{
static char msg[] = "Stopping... \n";
- write(2, msg, sizeof(msg)-1);
+ (void) write(2, msg, sizeof(msg)-1);
interrupted = 1;
}
--
1.7.7.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] notmuch: Quiet buildbot warnings.
2011-12-20 15:20 [PATCH] notmuch: Quiet buildbot warnings David Edmondson
@ 2011-12-21 12:16 ` David Bremner
2011-12-21 22:06 ` Thomas Jost
1 sibling, 0 replies; 5+ messages in thread
From: David Bremner @ 2011-12-21 12:16 UTC (permalink / raw)
To: David Edmondson, notmuch
On Tue, 20 Dec 2011 15:20:04 +0000, David Edmondson <dme@dme.org> wrote:
> Cast away the result of various *write functions. Provide a default
> value for some variables to avoid "use before set" warnings.
Pushed. It turns out this doesn't quiet 3 of the warnings. Maybe Tom can
investigate what is different about buildbots environment.
d
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] notmuch: Quiet buildbot warnings.
2011-12-20 15:20 [PATCH] notmuch: Quiet buildbot warnings David Edmondson
2011-12-21 12:16 ` David Bremner
@ 2011-12-21 22:06 ` Thomas Jost
2011-12-24 19:55 ` Tom Prince
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Jost @ 2011-12-21 22:06 UTC (permalink / raw)
To: David Edmondson, notmuch
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
On Tue, 20 Dec 2011 15:20:04 +0000, David Edmondson <dme@dme.org> wrote:
> Cast away the result of various *write functions. Provide a default
> value for some variables to avoid "use before set" warnings.
> ---
>
> The buildbot complains about these, though my own system (Debian
> testing on amd64) does not.
What's the version of glibc on the buildbot?
http://sourceware.org/bugzilla/show_bug.cgi?id=11959
Regards,
--
Thomas/Schnouki
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] notmuch: Quiet buildbot warnings.
2011-12-21 22:06 ` Thomas Jost
@ 2011-12-24 19:55 ` Tom Prince
2011-12-26 11:00 ` David Edmondson
0 siblings, 1 reply; 5+ messages in thread
From: Tom Prince @ 2011-12-24 19:55 UTC (permalink / raw)
To: Thomas Jost, David Edmondson, notmuch
On Wed, 21 Dec 2011 23:06:50 +0100, Thomas Jost <schnouki@schnouki.net> wrote:
Non-text part: multipart/mixed
Non-text part: multipart/signed
> On Tue, 20 Dec 2011 15:20:04 +0000, David Edmondson <dme@dme.org> wrote:
> > Cast away the result of various *write functions. Provide a default
> > value for some variables to avoid "use before set" warnings.
> > ---
> >
> > The buildbot complains about these, though my own system (Debian
> > testing on amd64) does not.
>
> What's the version of glibc on the buildbot?
> http://sourceware.org/bugzilla/show_bug.cgi?id=11959
I have 2.13-r2 (gentoo) installed currently.
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] notmuch: Quiet buildbot warnings.
2011-12-24 19:55 ` Tom Prince
@ 2011-12-26 11:00 ` David Edmondson
0 siblings, 0 replies; 5+ messages in thread
From: David Edmondson @ 2011-12-26 11:00 UTC (permalink / raw)
To: Tom Prince, Thomas Jost, notmuch
[-- Attachment #1: Type: text/plain, Size: 869 bytes --]
On Sat, 24 Dec 2011 12:55:57 -0700, Tom Prince <tom.prince@ualberta.net> wrote:
> On Wed, 21 Dec 2011 23:06:50 +0100, Thomas Jost <schnouki@schnouki.net> wrote:
> Non-text part: multipart/mixed
> Non-text part: multipart/signed
> > On Tue, 20 Dec 2011 15:20:04 +0000, David Edmondson <dme@dme.org> wrote:
> > > Cast away the result of various *write functions. Provide a default
> > > value for some variables to avoid "use before set" warnings.
> > > ---
> > >
> > > The buildbot complains about these, though my own system (Debian
> > > testing on amd64) does not.
> >
> > What's the version of glibc on the buildbot?
> > http://sourceware.org/bugzilla/show_bug.cgi?id=11959
>
> I have 2.13-r2 (gentoo) installed currently.
Debian testing has 2.13-21, which seems vaguely similar.
Is there anyone other than the buildbot who sees the errors?
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-12-26 11:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20 15:20 [PATCH] notmuch: Quiet buildbot warnings David Edmondson
2011-12-21 12:16 ` David Bremner
2011-12-21 22:06 ` Thomas Jost
2011-12-24 19:55 ` Tom Prince
2011-12-26 11:00 ` David Edmondson
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
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 read-only IMAP folder(s) and NNTP newsgroup(s).