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)
Tracking
(Not tracked)
VERIFIED
FIXED
M9
People
(Reporter: kherron+mozilla, Assigned: mcafee)
Details
Attachments
(7 files)
|
1.21 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.98 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.52 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.86 KB,
patch
|
Details | Diff | Splinter Review | |
|
6.35 KB,
patch
|
Details | Diff | Splinter Review | |
|
1023 bytes,
patch
|
Details | Diff | Splinter Review | |
|
505 bytes,
patch
|
Details | Diff | Splinter Review |
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.
| Reporter | ||
Comment 1•26 years ago
|
||
| Reporter | ||
Comment 2•26 years ago
|
||
| Reporter | ||
Comment 3•26 years ago
|
||
| Reporter | ||
Comment 4•26 years ago
|
||
| Reporter | ||
Comment 5•26 years ago
|
||
| Reporter | ||
Comment 6•26 years ago
|
||
| Reporter | ||
Comment 7•26 years ago
|
||
Comment 8•26 years ago
|
||
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
Comment 9•26 years ago
|
||
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
| Assignee | ||
Updated•26 years ago
|
Target Milestone: M9
| Assignee | ||
Comment 10•26 years ago
|
||
I have these changes in my tree, waiting for tree to open for M9.
| Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 11•26 years ago
|
||
Checked this in.
Comment 12•26 years ago
|
||
marking Verified since all seems well now.
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•