2011/7/12 Pádraig Brady <p...@draigbrady.com>: > On 12/07/11 02:56, Andrew Beekhof wrote: >> 2011/7/1 Pádraig Brady <p...@draigbrady.com>: >>> On 01/07/11 07:34, Andrew Beekhof wrote: >>>> 2011/6/28 Pádraig Brady <p...@draigbrady.com>: >>>>> # HG changeset patch >>>>> # User Pádraig Brady <p...@draigbrady.com> >>>>> # Date 1309255312 -3600 >>>>> # Node ID 7948a86a7e9510db13baa318fe64e9015fdbbd72 >>>>> # Parent 75575ce398615dff21e2309c6b97523e99499498 >>>>> Dev: build: avoid GCC 4.6 warnings >>>>> >>>>> diff -r 75575ce39861 -r 7948a86a7e95 crmd/election.c >>>>> --- a/crmd/election.c Tue Jun 21 15:54:20 2011 +0200 >>>>> +++ b/crmd/election.c Tue Jun 28 11:01:52 2011 +0100 >>>>> @@ -445,6 +445,8 @@ >>>>> } >>>>> >>>>> last_election_win = time(NULL); >>>>> +#else >>>>> + (void) last_election_win; >>>>> #endif >>>>> register_fsa_input(C_FSA_INTERNAL, I_ELECTION, NULL); >>>>> g_hash_table_destroy(voted); >>>> >>>> Why is this necessary? last_election_win is already used outside of >>>> the #if 0 block. >>> >>> It's only written to outside the #if 0 block, >>> never read. >> >> Do you happen to know the flags to turn off this warning? > > $ make > election.c: In function ‘do_election_count_vote’: > election.c:259:16: error: variable ‘last_election_win’ set but not used > [-Werror=unused-but-set-variable] > cc1: all warnings being treated as errors > > So -Wnounused-but-set-variable will disable that particular warning.
Perfect. Added that to configure. _______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker