[pacman-dev] [PATCH] Fix compile warnings on systems without getmntent

Allan McRae allan at archlinux.org
Thu Jan 9 23:14:10 EST 2014


On 09/01/14 03:03, Dan McGee wrote:
> On Thu, Jan 2, 2014 at 4:03 PM, Allan McRae <allan at archlinux.org> wrote:
> 
>> On 03/01/14 04:37, Dan McGee wrote:
>>> Signed-off-by: Dan McGee <dan at archlinux.org>
>>> ---
>>
>> I had submitted this a patch flagging the parameters as potentially unused:
>> https://patchwork.archlinux.org/patch/1788/
>>
> 
> I am not a huge fan of flagging things as unused when they are in fact used
> on certain code paths, but I'm not going to object either way. You're in
> charge! :)
> 

That flag just say "potentially unused", so it is perfect for this
situation.  Until the variable becomes used in all code paths and it
unused flags is not removed...

I'll flip a coin to pick a patch in the next merge.

>>
>>>  lib/libalpm/diskspace.c | 3 +++
>>>  1 file changed, 3 insertions(+)
>>>
>>> diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c
>>> index dcab3b0..cfd0a7a 100644
>>> --- a/lib/libalpm/diskspace.c
>>> +++ b/lib/libalpm/diskspace.c
>>> @@ -84,6 +84,9 @@ static int mount_point_load_fsinfo(alpm_handle_t
>> *handle, alpm_mountpoint_t *mou
>>>       _alpm_log(handle, ALPM_LOG_DEBUG, "loading fsinfo for %s\n",
>> mountpoint->mount_dir);
>>>       mountpoint->read_only = mountpoint->fsp.f_flag & ST_RDONLY;
>>>       mountpoint->fsinfo_loaded = MOUNT_FSINFO_LOADED;
>>> +#else
>>> +     (void)handle;
>>> +     (void)mountpoint;
>>>  #endif
>>>
>>>       return 0;
>>>
>>
>>
>>
> 
> 
> 



More information about the pacman-dev mailing list