Closed Bug 9245 Opened 26 years ago Closed 26 years ago

Signed/unsigned compiler warnings in mozilla/dbm/src

Categories

(Core Graveyard :: Tracking, defect, P3)

x86
Linux

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: kherron+mozilla, Assigned: mcafee)

Details

Attachments

(7 files)

size_t is unsigned on linux, causing compiler warnings when one uses an int where a size_t is expected in an argument list, for example: mozilla/dbm/src/h_page.c: In function `new_lseek': mozilla/dbm/src/h_page.c:162: warning: passing arg 3 of `write' as unsigned due to prototype mozilla/dbm/src/h_page.c: In function `__split_page': mozilla/dbm/src/h_page.c:333: warning: passing arg 3 of `__call_hash' as signed due to prototype mozilla/dbm/src/h_page.c:339: warning: passing arg 3 of `memmove' as unsigned due to prototype mozilla/dbm/src/h_page.c: In function `ugly_split': mozilla/dbm/src/h_page.c:444: warning: passing arg 5 of `__big_split' as signed due to prototype .mozilla/dbm/src/h_page.c:494: warning: passing arg 3 of `__call_hash' as signed due to prototype mozilla/dbm/src/h_page.c: In function `__get_page': mozilla/dbm/src/h_page.c:701: warning: passing arg 1 of `__log2' as unsigned due to prototype mozilla/dbm/src/h_page.c:703: warning: passing arg 3 of `read' as unsigned due to prototype mozilla/dbm/src/h_page.c: In function `__put_page': mozilla/dbm/src/h_page.c:857: warning: passing arg 1 of `__log2' as unsigned due to prototype mozilla/dbm/src/h_page.c:859: warning: passing arg 3 of `write' as unsigned due to prototype mozilla/dbm/src/h_page.c: In function `__ibitmap': mozilla/dbm/src/h_page.c:909: warning: passing arg 1 of `malloc' as unsigned due to prototype mozilla/dbm/src/h_page.c:914: warning: passing arg 3 of `memset' as unsigned due to prototype mozilla/dbm/src/h_page.c:916: warning: passing arg 3 of `memset' as unsigned due to prototype mozilla/dbm/src/h_page.c: In function `fetch_bitmap': mozilla/dbm/src/h_page.c:1204: warning: passing arg 1 of `malloc' as unsigned due to prototype Similar lists of warnings are produced by h_bigkey.c, hash.c; hash_buf.c and nsres.c also had a warning apiece. The attached patches correct all of these warnings. In some cases it's by adding a (size_t) cast to arguments to functions like malloc() where the argument is supposed to be a size_t. In a few cases, it's by changing the declarations of static or internal functions, so a couple of the module's include files have minor changes as well.
nto sure we are using this code anymore, but these patches should go to the module owner or frequent modifiers of the files. I see mcafee,warren,briano,ramiro,bradr in the cvs logs of of some of these files. maybe we can get one of these guys to pick up these changes, review and get them checked in. thanks
nto sure we are using this code anymore, but these patches should go to the module owner or frequent modifiers of the files. I see mcafee,warren,briano,ramiro,braddr in the cvs logs of of some of these files. maybe we can get one of these guys to pick up these changes, review and get them checked in. thanks
Target Milestone: M9
I have these changes in my tree, waiting for tree to open for M9.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Checked this in.
Status: RESOLVED → VERIFIED
marking Verified since all seems well now.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: