[Pacemaker] [PATCH] Dev: build: avoid GCC 4.6 warnings
Pádraig Brady
P at draigBrady.com
Fri Jul 1 10:58:26 CET 2011
On 01/07/11 07:34, Andrew Beekhof wrote:
> 2011/6/28 Pádraig Brady <P at draigbrady.com>:
>> # HG changeset patch
>> # User Pádraig Brady <P at 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.
cheers,
Pádraig.
More information about the Pacemaker
mailing list