curently gnomevfs code fails to build with -Wformat
-Werror=format-security because of the following code in
GError* error = g_error_new(GNOME_VFS_ERROR, result, gnome_vfs_result_to_string(result));
error is :
gnomevfs-result.c:50: error: format not a string literal and no format
I think it’s totally safe code as gnome_vfs_result_to_string actually
returns a const string nont containing any % but gcc doesn’t see that
Is this OK to change the line to the following ?
GError* error = g_error_new(GNOME_VFS_ERROR, result, "%s", gnome_vfs_result_to_string(result));
It would allow to build with this option, which is used by default when
building Mandriva packages, and maybe some other distros, but would not
actually improve security.