After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 712382 - Compilation warnings
Compilation warnings
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: build
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2013-11-15 16:45 UTC by Ondrej Holy
Modified: 2018-05-04 10:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdaemonfile fix (688 bytes, patch)
2013-11-15 16:46 UTC, Ondrej Holy
committed Details | Review
sftp fix (3.08 KB, patch)
2013-11-15 16:46 UTC, Ondrej Holy
committed Details | Review
afp fix (2.02 KB, patch)
2013-11-15 16:46 UTC, Ondrej Holy
committed Details | Review
gcc 4.8.2 warnings (2.65 KB, text/plain)
2013-11-18 05:19 UTC, Ross Lagerwall
  Details
clang 3.3 warnings (38.12 KB, text/plain)
2013-11-18 05:20 UTC, Ross Lagerwall
  Details
fuse: Remove duplicate assignment (681 bytes, patch)
2013-11-18 06:49 UTC, Ross Lagerwall
committed Details | Review
udisks2: Define SECRET_API_SUBJECT_TO_CHANGE to silence warning (723 bytes, patch)
2013-11-18 06:49 UTC, Ross Lagerwall
committed Details | Review
udisks2: Compile function only if we have udisks >= 2.0.90 (1.41 KB, patch)
2013-11-18 06:50 UTC, Ross Lagerwall
committed Details | Review
Make file-local functions static (1.39 KB, patch)
2013-11-18 06:50 UTC, Ross Lagerwall
committed Details | Review
udisks2: Initialize variables to prevent them being used uninitialized (1011 bytes, patch)
2013-11-18 06:50 UTC, Ross Lagerwall
committed Details | Review
client: Use the correct enumeration constant (1.38 KB, patch)
2013-11-18 06:50 UTC, Ross Lagerwall
committed Details | Review
build: Rename deprecated g_unix_mount_monitor_new (3.46 KB, patch)
2015-04-17 07:28 UTC, Ondrej Holy
committed Details | Review

Description Ondrej Holy 2013-11-15 16:45:38 UTC
There is several compilation warnings which could be fixed.

gdaemonfileenumerator.c: In function 'add_timeout_for_context':
gdaemonfileenumerator.c:112:9: warning: unused variable 'id' [-Wunused-variable]
   guint id;
         ^

gvfsbackendsftp.c: In function ‘try_seek_on_read’:
gvfsbackendsftp.c:2575:7: warning: enumeration value ‘G_SEEK_END’ not handled in switch [-Wswitch]
       switch (job->seek_type)
       ^

gvfsbackendsftp.c: In function ‘try_seek_on_write’:
gvfsbackendsftp.c:3706:7: warning: enumeration value ‘G_SEEK_END’ not handled in switch [-Wswitch]
       switch (job->seek_type)
       ^
gvfsbackendafp.c: In function ‘try_seek_on_read’:
gvfsbackendafp.c:823:5: warning: enumeration value ‘G_SEEK_END’ not handled in switch [-Wswitch]
     switch (job->seek_type)
Comment 1 Ondrej Holy 2013-11-15 16:46:15 UTC
Created attachment 259923 [details] [review]
gdaemonfile fix
Comment 2 Ondrej Holy 2013-11-15 16:46:39 UTC
Created attachment 259924 [details] [review]
sftp fix
Comment 3 Ondrej Holy 2013-11-15 16:46:57 UTC
Created attachment 259925 [details] [review]
afp fix
Comment 4 Ross Lagerwall 2013-11-18 05:14:26 UTC
Review of attachment 259923 [details] [review]:

Looks good!
Comment 5 Ross Lagerwall 2013-11-18 05:19:15 UTC
Created attachment 260073 [details]
gcc 4.8.2 warnings

FWIW, these are the warnings I get from gcc 4.8.2 (Fedora 20).
Comment 6 Ross Lagerwall 2013-11-18 05:20:05 UTC
Created attachment 260074 [details]
clang 3.3 warnings

These are the warnings I get with clang 3.3 (Fedora 20).
Comment 7 Ross Lagerwall 2013-11-18 05:47:31 UTC
Review of attachment 259924 [details] [review]:

Looks good!
Comment 8 Ross Lagerwall 2013-11-18 06:09:08 UTC
Review of attachment 259925 [details] [review]:

Looks good!
Comment 9 Ross Lagerwall 2013-11-18 06:49:51 UTC
Created attachment 260081 [details] [review]
fuse: Remove duplicate assignment
Comment 10 Ross Lagerwall 2013-11-18 06:49:57 UTC
Created attachment 260082 [details] [review]
udisks2: Define SECRET_API_SUBJECT_TO_CHANGE to silence warning
Comment 11 Ross Lagerwall 2013-11-18 06:50:03 UTC
Created attachment 260083 [details] [review]
udisks2: Compile function only if we have udisks >= 2.0.90
Comment 12 Ross Lagerwall 2013-11-18 06:50:09 UTC
Created attachment 260084 [details] [review]
Make file-local functions static

This silences some warnings.
Comment 13 Ross Lagerwall 2013-11-18 06:50:15 UTC
Created attachment 260085 [details] [review]
udisks2: Initialize variables to prevent them being used uninitialized
Comment 14 Ross Lagerwall 2013-11-18 06:50:21 UTC
Created attachment 260086 [details] [review]
client: Use the correct enumeration constant
Comment 15 Ondrej Holy 2013-11-21 11:26:51 UTC
Comment on attachment 259923 [details] [review]
gdaemonfile fix

commit 5110e2744b90b9ea62e99fc2405e77ed81efecea
Comment 16 Ondrej Holy 2013-11-21 11:27:33 UTC
Comment on attachment 259924 [details] [review]
sftp fix

commit 53933e21316db15d70b540501af716860c0ff055
Comment 17 Ondrej Holy 2013-11-21 11:27:49 UTC
Comment on attachment 259925 [details] [review]
afp fix

commit 65216faae97bfce29006fbd479feed6fc37cf342
Comment 18 Ondrej Holy 2013-11-21 12:01:16 UTC
The patches looks good, thanks for them, feel free to commit :-)

(In reply to comment #5)
> Created an attachment (id=260073) [details]
> gcc 4.8.2 warnings
> 
> FWIW, these are the warnings I get from gcc 4.8.2 (Fedora 20).

Looks like new version is more strict, so thanks for fixing those warnings...

(In reply to comment #6)
> Created an attachment (id=260074) [details]
> clang 3.3 warnings
> 
> These are the warnings I get with clang 3.3 (Fedora 20).

Cool, looks like -Wcast-align is disabled by default in gcc in contrast to clang, would be nice to check all of those warnings and fix them if possible, however gcc is default, so we don't care about warnings if everything is correct.
Comment 19 Ondrej Holy 2015-04-17 07:28:26 UTC
Created attachment 301789 [details] [review]
build: Rename deprecated g_unix_mount_monitor_new

g_unix_mount_monitor_new is deprecated now. It was renamed to g_unix_mount_monitor_get, because it is singleton. See Bug 742599.
    
Bump the glib version accordingly.
Comment 20 Ross Lagerwall 2015-04-18 17:53:39 UTC
Review of attachment 301789 [details] [review]:

Looks good!
Comment 21 Ondrej Holy 2015-04-20 09:35:50 UTC
Comment on attachment 301789 [details] [review]
build: Rename deprecated g_unix_mount_monitor_new

commit 463e5b10539bc985efc30ea7da0bf045654ef75b
Comment 22 Ondrej Holy 2018-05-04 10:23:14 UTC
This is an old bug and I don't see currently any build warnings, let's close as fixed...