Closed
Bug 312100
Opened 20 years ago
Closed 20 years ago
Uninitialized variable 'scope' in the testfile.c test
Categories
(NSPR :: NSPR, defect)
NSPR
NSPR
Tracking
(Not tracked)
RESOLVED
FIXED
4.7
People
(Reporter: wtc, Assigned: wtc)
Details
Attachments
(1 file)
475 bytes,
patch
|
Details | Diff | Splinter Review |
Visual C++ .NET 2003 issued the following compiler warning
when compiling the testfile.c test program:
cl -Fotestfile.obj -c -W3 -nologo -GF -Gy -Od -MDd -Z7 -UNDEBUG
-DDEBUG_wtc -UWINNT -DDEBUG=1 -DXP_PC=1 -DWIN32=1 -D_DEBUG=1 -DWIN95=1
-D_PR_GLOBAL_THREADS_ONLY=1 -D_X86_=1 -DFORCE_PR_LOG
-I../../dist/include/nspr -I../../../mozilla/nsprpub/pr/include
-I../../../mozilla/nsprpub/pr/include/private
C:/nspr-client-branch/win95.dbgd/pr/tests/../../../mozilla/nsprpub/pr/tests/testfile.c
testfile.c
c:\nspr-client-branch\mozilla\nsprpub\pr\tests\testfile.c(501) : warning C4700:
local variable 'scope' used without having been initialized
link -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO testfile.obj
../../dist/lib/plc4.lib ../../dist/lib/nspr4.lib wsock32.lib -out:testfile.exe
I looked at this warning and confirmed that it is correct. However,
it only affects platforms for which the following expression is false:
#if (defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)) || defined(WIN32) || def
ined(XP_OS2)
This means this bug does not affect Windows, OS/2, and most Unix platforms
(the Unix platforms, including Linux and Mac OS X, that use pthreads).
Assignee | ||
Comment 1•20 years ago
|
||
Initialize 'scope' to PR_GLOBAL_THREAD, the currently
recommend value for the 'scope' argument to PR_CreateThread.
Assignee | ||
Comment 2•20 years ago
|
||
Patch checked in on the NSPR tip (NSPR 4.7) and
the NSPRPUB_PRE_4_2_CLIENT_BRANCH.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: [4.7]
Assignee | ||
Updated•19 years ago
|
Whiteboard: [4.7]
Target Milestone: --- → 4.7
You need to log in
before you can comment on or make changes to this bug.
Description
•