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 666331 - [Patch] Silence a few warnings
[Patch] Silence a few warnings
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2011-12-15 23:32 UTC by Marc-Antoine Perennou
Modified: 2012-01-04 19:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
drop JS_LOCALETOUNICODE_NEEDS_CONST_CHAR check (1.96 KB, patch)
2011-12-15 23:35 UTC, Marc-Antoine Perennou
accepted-commit_now Details | Review
silence warnings about argv not being used (1.12 KB, patch)
2011-12-15 23:35 UTC, Marc-Antoine Perennou
needs-work Details | Review
silence warnings about argv not being used (2.95 KB, patch)
2011-12-16 08:40 UTC, Marc-Antoine Perennou
accepted-commit_now Details | Review
drop JS_LOCALETOUNICODE_NEEDS_CONST_CHAR check and silence warnings (4.58 KB, patch)
2012-01-04 19:11 UTC, Marc-Antoine Perennou
committed Details | Review

Description Marc-Antoine Perennou 2011-12-15 23:32:01 UTC
Since we now depend on mozjs185, we can now drop the check for const char* need in js_localeTounicode.
Also, passing all constructors to macros introduced some warnings about argv not being used.
Comment 1 Marc-Antoine Perennou 2011-12-15 23:35:02 UTC
Created attachment 203615 [details] [review]
drop JS_LOCALETOUNICODE_NEEDS_CONST_CHAR check
Comment 2 Marc-Antoine Perennou 2011-12-15 23:35:27 UTC
Created attachment 203616 [details] [review]
silence warnings about argv not being used
Comment 3 Jasper St. Pierre (not reading bugmail) 2011-12-16 02:14:58 UTC
Review of attachment 203615 [details] [review]:

Sure.
Comment 4 Jasper St. Pierre (not reading bugmail) 2011-12-16 02:15:19 UTC
Review of attachment 203616 [details] [review]:

I'd prefer it if you put G_GNUC_UNUSED in the actual macro.
Comment 5 Marc-Antoine Perennou 2011-12-16 08:40:01 UTC
Created attachment 203638 [details] [review]
silence warnings about argv not being used

That's the way I did things the first time I submitted a patch for this warning when it came up some times ago, I also proposed an alternative, not using GJS_NATIVE_CONSTRUCTOR_VARIABLES in those cases and only declaring JSObject *object = NULL, but I was told to do it this way, so it was for consistency.
Though, here is a patch using G_GNUC_UNUSED and btw removing the oter argv casts to void
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-01-04 19:07:23 UTC
Review of attachment 203638 [details] [review]:

Please squash the two patches. Otherwise looks fine.
Comment 7 Marc-Antoine Perennou 2012-01-04 19:11:19 UTC
Created attachment 204597 [details] [review]
drop JS_LOCALETOUNICODE_NEEDS_CONST_CHAR check and silence warnings
Comment 8 Jasper St. Pierre (not reading bugmail) 2012-01-04 19:59:06 UTC
Attachment 204597 [details] pushed as 4cecec9 - drop JS_LOCALETOUNICODE_NEEDS_CONST_CHAR check and silence warnings