Closed Bug 739958 Opened 12 years ago Closed 12 years ago

fix compiler warnings in libmar

Categories

(Toolkit :: Application Update, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: froydnj, Assigned: froydnj)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In file included from /home/froydnj/src/m-c.git/modules/libmar/src/mar_create.c:46:0:
/home/froydnj/src/m-c.git/modules/libmar/src/mar_cmdline.h:104:32: warning: 'struct ProductInformationBlock' declared inside parameter list [enabled by default]
/home/froydnj/src/m-c.git/modules/libmar/src/mar_create.c: In function 'refresh_product_info_block':
/home/froydnj/src/m-c.git/modules/libmar/src/mar_create.c:238:26: warning: pointer targets in passing argument 2 of 'get_mar_file_info' differ in signedness [-Wpointer-sign]
/home/froydnj/src/m-c.git/modules/libmar/src/mar_cmdline.h:67:5: note: expected 'int *' but argument is of type 'PRUint32 *'
/home/froydnj/src/m-c.git/modules/libmar/src/mar_create.c:238:26: warning: pointer targets in passing argument 3 of 'get_mar_file_info' differ in signedness [-Wpointer-sign]
/home/froydnj/src/m-c.git/modules/libmar/src/mar_cmdline.h:67:5: note: expected 'int *' but argument is of type 'PRUint32 *'
/home/froydnj/src/m-c.git/modules/libmar/src/mar_create.c:238:26: warning: pointer targets in passing argument 4 of 'get_mar_file_info' differ in signedness [-Wpointer-sign]
/home/froydnj/src/m-c.git/modules/libmar/src/mar_cmdline.h:67:5: note: expected 'int *' but argument is of type 'PRUint32 *'
/home/froydnj/src/m-c.git/modules/libmar/src/mar_create.c:238:26: warning: pointer targets in passing argument 5 of 'get_mar_file_info' differ in signedness [-Wpointer-sign]
/home/froydnj/src/m-c.git/modules/libmar/src/mar_cmdline.h:67:5: note: expected 'int *' but argument is of type 'PRUint32 *'
/home/froydnj/src/m-c.git/modules/libmar/src/mar_create.c:238:26: warning: pointer targets in passing argument 6 of 'get_mar_file_info' differ in signedness [-Wpointer-sign]
/home/froydnj/src/m-c.git/modules/libmar/src/mar_cmdline.h:67:5: note: expected 'int *' but argument is of type 'PRUint32 *'
/home/froydnj/src/m-c.git/modules/libmar/src/mar_read.c: In function 'mar_read_product_info_block':
/home/froydnj/src/m-c.git/modules/libmar/src/mar_read.c:279:3: warning: implicit declaration of function 'get_mar_file_info_fp' [-Wimplicit-function-declaration]
/home/froydnj/src/m-c.git/modules/libmar/src/mar_read.c: In function 'get_mar_file_info_fp':
/home/froydnj/src/m-c.git/modules/libmar/src/mar_read.c:556:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/home/froydnj/src/m-c.git/modules/libmar/tool/mar.c: In function 'main':
/home/froydnj/src/m-c.git/modules/libmar/tool/mar.c:177:5: warning: C++ style comments are not allowed in ISO C90 [enabled by default]
/home/froydnj/src/m-c.git/modules/libmar/tool/mar.c:177:5: warning: (this will be reported only once per input file) [enabled by default]
/home/froydnj/src/m-c.git/modules/libmar/tool/mar.c:185:5: warning: implicit declaration of function 'refresh_product_info_block' [-Wimplicit-function-declaration]
Attached patch patchSplinter Review
Attachment #610097 - Flags: review?(robert.bugzilla)
Comment on attachment 610097 [details] [diff] [review]
patch

Tossing this over to Brian.
Attachment #610097 - Flags: review?(robert.bugzilla) → review?(netzen)
Comment on attachment 610097 [details] [diff] [review]
patch

Review of attachment 610097 [details] [diff] [review]:
-----------------------------------------------------------------

The nits are probably carried over from the old code, but while you're there...
Thanks for the patch!

Also please remember to fix the r=rstrong to r=bbondy in the patch before pushing.

::: modules/libmar/src/mar_cmdline.h
@@ +110,5 @@
> + * The input MAR must not be signed or the function call will fail.
> + * 
> + * @param path             The path to the MAR file who's product info block
> + *                         should be refreshed.
> + * @param infoBlock Out parameter for where to store the result to

nit: Please align the description for @param path and the description for @param infoBlock.

::: modules/libmar/src/mar_read.c
@@ +240,5 @@
> + * Determines the MAR file information.
> + *
> + * @param fp                     An opened MAR file in read mode.
> + * @param hasSignatureBlock      Optional out parameter specifying if the MAR
> + *                               file is has a signature block or not.

nit: s/file is has/file has/
Attachment #610097 - Flags: review?(netzen) → review+
(In reply to Brian R. Bondy [:bbondy] from comment #3)
> The nits are probably carried over from the old code, but while you're
> there...
> Thanks for the patch!

I took the liberty of fixing the issues you pointed out in the places you pointed out and in the copy-and-pasted (?) places elsewhere.  I also took the liberty of fixing some spelling errors and parameter name mismatches.  I assume this was OK, given the above.

https://hg.mozilla.org/integration/mozilla-inbound/rev/9c5902be8300
Assignee: nobody → nfroyd
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla14
Sounds great, thanks again.
https://hg.mozilla.org/mozilla-central/rev/9c5902be8300
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: