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 784050 - Warning fixes
Warning fixes
Status: RESOLVED FIXED
Product: libgepub
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: libgepub Maintainer(s)
libgepub Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-06-21 16:54 UTC by Bastien Nocera
Modified: 2017-06-22 07:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
lib: Fix mixed declarations and code (3.76 KB, patch)
2017-06-21 16:54 UTC, Bastien Nocera
committed Details | Review
lib: Make private functions static (2.65 KB, patch)
2017-06-21 16:54 UTC, Bastien Nocera
none Details | Review
lib: Make "transfer none" strings "const" instead (2.20 KB, patch)
2017-06-21 16:54 UTC, Bastien Nocera
committed Details | Review
lib: Fix "enumeration value not handled in switch" (920 bytes, patch)
2017-06-21 16:54 UTC, Bastien Nocera
committed Details | Review
lib: Fix discarding const qualifier (970 bytes, patch)
2017-06-21 16:55 UTC, Bastien Nocera
committed Details | Review
lib: Fix memory leaks and warnings in gepub_utils_has_parent_tag() (1.88 KB, patch)
2017-06-21 16:55 UTC, Bastien Nocera
committed Details | Review
lib: Fix unused functions and variables warnings (1.49 KB, patch)
2017-06-21 16:55 UTC, Bastien Nocera
committed Details | Review
fixup! lib: Make private functions static (680 bytes, patch)
2017-06-21 16:55 UTC, Bastien Nocera
none Details | Review
lib: Fix obviously incorrect comparison (795 bytes, patch)
2017-06-21 16:55 UTC, Bastien Nocera
committed Details | Review
lib: Make private functions static (2.84 KB, patch)
2017-06-21 16:55 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2017-06-21 16:54:38 UTC
.
Comment 1 Bastien Nocera 2017-06-21 16:54:42 UTC
Created attachment 354177 [details] [review]
lib: Fix mixed declarations and code

"ISO C90 forbids mixed declarations and code"
Comment 2 Bastien Nocera 2017-06-21 16:54:47 UTC
Created attachment 354178 [details] [review]
lib: Make private functions static

Fixes "no previous prototype for ..." warnings
Comment 3 Bastien Nocera 2017-06-21 16:54:52 UTC
Created attachment 354179 [details] [review]
lib: Make "transfer none" strings "const" instead

Fixes "return discards ‘const’ qualifier from pointer target type"
warnings and removes the need for an introspection tag.
Comment 4 Bastien Nocera 2017-06-21 16:54:58 UTC
Created attachment 354180 [details] [review]
lib: Fix "enumeration value not handled in switch"

"enumeration value ‘GEPUBTextNormal’ not handled in switch"
Comment 5 Bastien Nocera 2017-06-21 16:55:03 UTC
Created attachment 354181 [details] [review]
lib: Fix discarding const qualifier

passing argument 2 of ‘gepub_utils_has_parent_tag’ discards ‘const’ qualifier from pointer target type
Comment 6 Bastien Nocera 2017-06-21 16:55:08 UTC
Created attachment 354182 [details] [review]
lib: Fix memory leaks and warnings in gepub_utils_has_parent_tag()

Both the node name and what we were comparing it against were leaked at
every iteration of the loop.
Comment 7 Bastien Nocera 2017-06-21 16:55:14 UTC
Created attachment 354183 [details] [review]
lib: Fix unused functions and variables warnings
Comment 8 Bastien Nocera 2017-06-21 16:55:20 UTC
Created attachment 354184 [details] [review]
fixup! lib: Make private functions static
Comment 9 Bastien Nocera 2017-06-21 16:55:25 UTC
Created attachment 354185 [details] [review]
lib: Fix obviously incorrect comparison

We assign "contents" but check "res" for != NULL...
Comment 10 Bastien Nocera 2017-06-21 16:55:58 UTC
Created attachment 354186 [details] [review]
lib: Make private functions static

Fixes "no previous prototype for ..." warnings
Comment 11 Bastien Nocera 2017-06-21 16:56:41 UTC
Please review those carefully, especially with https://bugzilla.gnome.org/show_bug.cgi?id=784049 in mind.
Comment 12 Daniel Garcia 2017-06-22 06:46:49 UTC
Attachment 354177 [details] pushed as c48f858 - lib: Fix mixed declarations and code
Attachment 354179 [details] pushed as 85e1181 - lib: Make "transfer none" strings "const" instead
Attachment 354180 [details] pushed as 7127341 - lib: Fix "enumeration value not handled in switch"
Comment 13 Daniel Garcia 2017-06-22 06:58:20 UTC
Comment on attachment 354182 [details] [review]
lib: Fix memory leaks and warnings in gepub_utils_has_parent_tag()

Attachment 354182 [details] pushed as 5ca8b09 - lib: Fix memory leaks and warnings in gepub_utils_has_parent_tag()
Comment 14 Daniel Garcia 2017-06-22 07:04:41 UTC
Attachment 354181 [details] pushed as 67e3b79 - lib: Fix discarding const qualifier
Attachment 354183 [details] pushed as 2691800 - lib: Fix unused functions and variables warnings
Attachment 354185 [details] pushed as 81b37ad - lib: Fix obviously incorrect comparison
Attachment 354186 [details] pushed as 7f48731 - lib: Make private functions static