Re: patch for 64bit compilation

Hash: SHA1

Alexander Larsson wrote:


>>cc1: warnings being treated as errors
>>gnome-vfs-open-fd.c: In function 'get_stat_info_from_handle':
>>gnome-vfs-open-fd.c:282: warning: value computed is not used
>>make[1]: *** [gnome-vfs-open-fd.lo] Error 1
>>make[1]: *** Waiting for unfinished jobs....
> Bah, thats a stupid warning. Its not 64bit related either. Do you use a
> newer compiler or something?

I thought so too until I read the bug referenced in my previous email.
In this particular case, there's a strong argument that the warning
shouldn't apply, but in general such uses are likely to contain bugs.

> Your patch actually changes the API of the macro, making it not return a
> value. Maybe nobody uses that value, but I'm still hesitant to change it
> for this stupid warning. So we can:
> a) figure out what triggered this new stupid warning and see if we can
> disable it
> or
> b) use "(void)GNOME_VFS_FILE_INFO_SET_LOCAL (file_info, TRUE);"

c) actually "use" the computed value in the macro without changing API.
 See my suggested change.

>>> and why didn't it appear for the other SET_*
>>hmm, not sure, I just saw the error for those two.
> Maybe its the only such macro that is used inside vfs?

I suspect it's the only macro used inside vfs.  But other applications
using those macros will get the warnings on newer versions of GCC.

- --
Shahms E. King <shahms shahms com>
Multnomah ESD

Public Key:
1612 054B CE92 8770 F1EA  AB1B FEAB 3636 45B2 D75B
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora -


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]