error C2374 while compiling TestUrlClassifierUtils.cpp

RESOLVED WONTFIX

Status

()

Core
General
--
major
RESOLVED WONTFIX
11 years ago
7 years ago

People

(Reporter: Arnaud Grandville, Assigned: mkaply)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Fix
1.08 KB, text/plain
Benjamin Smedberg
: review+
Details
(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

$ pwd 
/c/mozilla/toolkit/components/url-classifier/tests
$ make
/local/bin/make export
make[1]: Entering directory `/c/mozilla/toolkit/components/url-classifier/tests'
make[1]: Nothing to be done for `export'.
make[1]: Leaving directory `/c/mozilla/toolkit/components/url-classifier/tests'
/local/bin/make libs
make[1]: Entering directory `/c/mozilla/toolkit/components/url-classifier/tests'
TestUrlClassifierUtils.cpp
Building deps for TestUrlClassifierUtils.cpp
cl -FoTestUrlClassifierUtils.obj -c  -DMOZILLA_INTERNAL_API -DOSTYPE=\"WINNT5.2\" -DOSARCH=\"WINNT\" -DBUILD_ID=0000000000 -I./../src -I./../public  -I../../../../dist/include/string -I../../../../dist/include/url-classifier -I../../../../dist/include/xpcom -I../../../../dist/include/test_url-classifier -I../../../../dist/include -I../../../../dist/include/nspr          -TP -nologo -W3 -Gy -FdTestUrlClassifierUtils.pdb  -DNDEBUG -DTRIMMED -O1 -MD            -DX_DISPLAY_MISSING=1 -DMOZILLA_VERSION=\"1.8.1.6\" -DMOZILLA_VERSION_U=1.8.1.6 -DHAVE_SNPRINTF=1 -D_WINDOWS=1 -D_WIN32=1 -DWIN32=1 -DXP_WIN=1 -DXP_WIN32=1 -DHW_THREADS=1 -DWINVER=0x400 -D_WIN32_WINNT=0x400 -DSTDC_HEADERS=1 -DWIN32_LEAN_AND_MEAN=1 -DNO_X11=1 -D_X86_=1 -DD_INO=d_ino -DMOZ_DEFAULT_TOOLKIT=\"windows\" -DMOZ_PHOENIX=1 -DMOZ_BUILD_APP=browser -DMOZ_XUL_APP=1 -DMOZ_ENABLE_CANVAS=1 -DMOZ_DISTRIBUTION_ID=\"org.mozilla\" -DOJI=1 -DIBMBIDI=1 -DMOZ_VIEW_SOURCE=1 -DACCESSIBILITY=1 -DMOZ_XPINSTALL=1 -DMOZ_JSLOADER=1 -DNS_PRINTING=1 -DNS_PRINT_PREVIEW=1 -DMOZ_XTF=1 -DMOZ_MATHML=1 -DMOZ_UPDATE_CHANNEL=default -DMOZ_FEEDS=1 -DMOZ_STORAGE=1 -DMOZ_SAFE_BROWSING=1 -DMOZ_URL_CLASSIFIER=1 -DMOZ_LOGGING=1 -DMOZ_USER_DIR=\"Mozilla\" -DHAVE_UINT64_T=1 -DMOZ_XUL=1 -DMOZ_PROFILELOCKING=1 -DMOZ_MORK=1 -DMOZ_DLL_SUFFIX=\".dll\" -DJS_THREADSAFE=1 -DMOZILLA_1_8_BRANCH=1 -DMOZILLA_LOCALE_VERSION=\"1.8.1\" -DMOZILLA_REGION_VERSION=\"1.8.1\" -DMOZILLA_SKIN_VERSION=\"1.8\"  -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT /c/mozilla/toolkit/components/url-classifier/tests/TestUrlClassifierUtils.cpp
TestUrlClassifierUtils.cpp
c:/mozilla/toolkit/components/url-classifier/tests/TestUrlClassifierUtils.cpp(144) : error C2374: 'i' : redefinition; multiple initialization
        c:/mozilla/toolkit/components/url-classifier/tests/TestUrlClassifierUtils.cpp(132) : see declaration of 'i'
make[1]: Leaving directory `/c/mozilla/toolkit/components/url-classifier/tests'


Reproducible: Always

Steps to Reproduce:
1.
2.
3.

Comment 1

11 years ago
You can fix this by moving the declaration of |i| outside the scope of the for loops.
Status: UNCONFIRMED → NEW
Component: Build Config → General
Ever confirmed: true
Product: Firefox → Core
QA Contact: build.config → general
Version: unspecified → Trunk
(Assignee)

Comment 2

10 years ago
This must be a bug in the Visual C 6 compiler? The syntax is legal. The for loop should define a new scope for the variable.

And this doesn't happen on trunk...
(Assignee)

Comment 3

10 years ago
Created attachment 316081 [details]
Fix

Move PRInt32 out of loops.

I really don't understand why I (and others) are running into this error, but it is not breaking on the 1.8 tinderboxes...
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Attachment #316081 - Flags: review?
(Assignee)

Updated

10 years ago
Attachment #316081 - Attachment mime type: application/octet-stream → text/plain
Attachment #316081 - Flags: review? → review?(benjamin)

Updated

10 years ago
Attachment #316081 - Flags: review?(benjamin) → review+
(Assignee)

Comment 4

7 years ago
No idea why this didn't get checked in at the time, but we certainly don't need it anymore.
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.