Closed
Bug 230001
Opened 21 years ago
Closed 13 years ago
<ptio.c>: Fix 2* ['start' might be used uninitialized in this function] from 'Blamed Build Warnings; Linux brad Clobber'; and code cleanup.
Categories
(NSPR :: NSPR, defect)
NSPR
NSPR
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: sgautherie, Assigned: sgautherie)
References
(Blocks 1 open bug)
Details
(Whiteboard: [build_warning])
Attachments
(2 files, 1 obsolete file)
47.83 KB,
patch
|
Details | Diff | Splinter Review | |
3.54 KB,
patch
|
nelson
:
review-
|
Details | Diff | Splinter Review |
The two ("bogus") warnings are: { (unblamed) 3. nsprpub/pr/src/pthreads/ptio.c:3748 (See build log excerpt) `start' might be used uninitialized in this function 3746 4. nsprpub/pr/src/pthreads/ptio.c:4816 (See build log excerpt) `start' might be used uninitialized in this function 4814 } The code is right, but the compiler does not track the |if| conditions.
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•21 years ago
|
Summary: Fix 2* ['start' might be used uninitialized in this function] from 'Blamed Build Warnings; Linux brad Clobber'; and code cleanup. → <ptio.c>: Fix 2* ['start' might be used uninitialized in this function] from 'Blamed Build Warnings; Linux brad Clobber'; and code cleanup.
Assignee | ||
Comment 1•21 years ago
|
||
Assignee | ||
Comment 2•21 years ago
|
||
Comment on attachment 138360 [details] [diff] [review] (Av1) <ptio.c> warning fix 'r=?': (see comment 0) I have no compiler: Could you compile/test/review it ? Thanks.
Attachment #138360 -
Flags: review?(wchang0222)
Assignee | ||
Comment 3•21 years ago
|
||
Assignee | ||
Comment 4•21 years ago
|
||
Comment on attachment 138364 [details] [diff] [review] (Bv1) <ptio.c> code cleanup I have no compiler: Could you compile/test/review it ? Thanks.
Attachment #138364 -
Flags: review?(wchang0222)
Assignee | ||
Updated•20 years ago
|
Updated•18 years ago
|
QA Contact: wtchang → nspr
Assignee | ||
Comment 5•15 years ago
|
||
Uncompiled, as this directory is not present in my Windows objdir. I'll realign the code in a follow-up patch. *** Bug still there: http://office.smedbergs.us:8080/search?user=&path=%25pthreads%25&msg=%25uninitialized%25&id=1280 # nsprpub/pr/src/pthreads/ptio.c:3762 - 'start' may be used uninitialized in this function # nsprpub/pr/src/pthreads/ptio.c:4916 - 'start' may be used uninitialized in this function
Attachment #138360 -
Attachment is obsolete: true
Attachment #371851 -
Flags: review?
Attachment #138360 -
Flags: review?(wtc)
Assignee | ||
Updated•15 years ago
|
Attachment #371851 -
Flags: review? → review?(wtc)
Assignee | ||
Comment 6•15 years ago
|
||
(In reply to comment #5) > Uncompiled, as this directory is not present in my Windows objdir. Tryserver is green with this as 'try-a6cb5e72ff8'. Yet there are additional warnings: { Linux: /builds/buildbot/sendchange-slave/sendchange-linux-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c: In function ‘pt_writev_cont’: /builds/buildbot/sendchange-slave/sendchange-linux-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c:903: warning: dereferencing type-punned pointer will break strict-aliasing rules Mac PPC: /builds/slave/sendchange-mac-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c: In function '_PR_InitIO': /builds/slave/sendchange-mac-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c:1174: warning: pointer targets in passing argument 5 of 'getsockopt' differ in signedness /builds/slave/sendchange-mac-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c: In function 'PR_Socket': /builds/slave/sendchange-mac-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c:3456: warning: unused variable 'tmp_domain' Mac i386: /builds/slave/sendchange-mac-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c: In function '_PR_InitIO': /builds/slave/sendchange-mac-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c:1174: warning: pointer targets in passing argument 5 of 'getsockopt' differ in signedness /builds/slave/sendchange-mac-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c: In function 'PR_Socket': /builds/slave/sendchange-mac-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c:3456: warning: unused variable 'tmp_domain' /builds/slave/sendchange-mac-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c: In function 'pt_Available_f': /builds/slave/sendchange-mac-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c:1472: warning: 'end' may be used uninitialized in this function /builds/slave/sendchange-mac-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c: In function 'pt_Available64_f': /builds/slave/sendchange-mac-hg/mozilla/nsprpub/pr/src/pthreads/ptio.c:1491: warning: 'end' may be used uninitialized in this function }
Updated•15 years ago
|
Attachment #371851 -
Flags: review-
Comment 7•15 years ago
|
||
Comment on attachment 371851 [details] [diff] [review] (Av1a) ptio.c: warning fix and little code cleanup The following change moves executable code up, so that it precedes an automatic variable definition. That's OK in c++ and in some versions of c, but some of the c compilers on platforms supported by NSPR do not allow it. So, r- for that. > static PRInt32 _pr_poll_with_poll( > PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout) > { >+ if (pt_TestAbort()) >+ return -1; >+ >+ if (0 == npds) { >+ PR_Sleep(timeout); >+ return 0; >+ } >+ > PRInt32 ready = 0;
Updated•13 years ago
|
Whiteboard: [build_warning]
Updated•13 years ago
|
Blocks: buildwarning
Comment 8•13 years ago
|
||
We don't have uninitialized variable in ptio.c file. We do have "variable xx set but not used" warning but that will be tracked by different bug. Hence Closing this bug.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•