Closed
Bug 303657
Opened 19 years ago
Closed 13 years ago
cleaning up, const-ifying modules/libreg/src/reg.c
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: mi+mozilla, Unassigned)
References
Details
(Whiteboard: [CLOSEME 2012-01-01])
Attachments
(1 file, 1 obsolete file)
|
10.06 KB,
patch
|
dveditz
:
review-
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; FreeBSD; X11; amd64) KHTML/3.4.1 (like Gecko) Build Identifier: The file arouse a lot of warnings, especially when compiled on amd64. I'm attaching the patch, which cleans and constifies it. Reproducible: Always
| Reporter | ||
Comment 1•19 years ago
|
||
| Reporter | ||
Comment 2•19 years ago
|
||
The return type and the local variables of nr_GetFileLength() ought to be off_t or, at least, long to allow it to operate on files larger than 4Gb. Not sure, who would need a registry this large, but what do I know :-)
Attachment #191781 -
Attachment is obsolete: true
Comment 3•19 years ago
|
||
I don't know if you know yet :), but normally you have to request review from a person to look at the patch. Though i'm not sure which one to pick here...
| Reporter | ||
Comment 4•19 years ago
|
||
=Though i'm not sure which one to pick here... Which person, or which patch to pick? The first patch is obsoleted by the second. I don't know anyone here, but the report is assigned to Doug T. Presumably, he'll review my patch as soon as he has time for it... But I'll welcome anyone's comments...
(In reply to comment #4) > I don't know anyone here, but the report is assigned to Doug T. Presumably, > he'll review my patch as soon as he has time for it... See http://www.mozilla.org/owners.html for Module Owners/Peers, it seems that http://www.mozilla.org/owners.html#registry is the right Module for this bug.
Comment 6•19 years ago
|
||
To be honest, some people get so much bugmail that it is likely that they won't see your patch. I'll set some review flag for you, hope it's ok.
Updated•19 years ago
|
Attachment #191783 -
Flags: review?(dveditz)
Updated•19 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 8•19 years ago
|
||
Comment on attachment 191783 [details] [diff] [review] one more potential problem fixed For the next patch it would help reviewing if you used more lines of context and used the -p option to add hints to which routine the change is in. This doesn't build on windows because fseeko and ftello don't exist. > readlen = XP_FileRead(buffer, len, fh ); > /* PR_READ() returns an unreliable length, check EOF separately */ >+#if !defined(USE_STDIO_MODES) /* USE_STDIO_MODES means XP_FileRead = fread */ > if (readlen < 0) { By redefining readlen as size_t this test doesn't make sense, but PR_Read uses -1 an error when USE_NSPR_MODES is true. This section would be clearer #if defined(USE_NSPR_MODES) rather than the negation of the other, btw. >-static REGERR nr_WriteFile(FILEHANDLE fh, REGOFF offset, int32 len, void *buffer) >+static REGERR nr_WriteFile(FILEHANDLE fh, REGOFF offset, size_t len, const void *buffer) >- if ((int32)XP_FileWrite(buffer, len, fh) != len) >+ if (XP_FileWrite(buffer, len, fh) != len) Likewise USE_NSPR_MODES does use int32. Maybe instead of swapping problems by using size_t you should add a #define type to the various vr_stubs.h sections. r-
Attachment #191783 -
Flags: review?(dveditz) → review-
Comment 9•19 years ago
|
||
Asa, Mikhail says he can't update this patch because you disabled his Bugzilla access at some point... Should someone else pick this up, or can you reenable his Bugzilla access?
| Reporter | ||
Comment 10•19 years ago
|
||
I think, this file should be split into clean OS-specific ones. The #ifdef spaghetti is just too much to have another look :-(
Comment 12•13 years ago
|
||
This is probably not needed after bug 679352.
Depends on: 679352
Whiteboard: [CLOSEME 2012-01-01]
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•