Closed Bug 416101 Opened 16 years ago Closed 16 years ago

Mingw build error in ../mozilla/dom/src/json/nsJSON.cpp

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bengt.erik.soderstrom, Assigned: martijn.martijn)

References

Details

Attachments

(1 file)

I believe this is a regression from check-in for Bug 410890.

I get this now:

Building deps for /cygdrive/d/mozilla/mozilla/dom/src/json/nsJSON.cpp
/cygdrive/d/mozilla/mozilla/build/cygwin-wrapper g++ -mno-cygwin -o nsJSON.o -c
 -D_IMPL_NS_LAYOUT -DMOZILLA_INTERNAL_API -DOSTYPE=\"WINNT5.1\" -DOSARCH=WINNT -
I/cygdrive/d/mozilla/mozilla/dom/src/json/../base -I/cygdrive/d/mozilla/mozilla/
content/events/src -I/cygdrive/d/mozilla/mozilla/dom/src/json -I. -I../../../dis
t/include/xpcom -I../../../dist/include/string -I../../../dist/include/content -
I../../../dist/include/caps -I../../../dist/include/js -I../../../dist/include/l
ocale -I../../../dist/include/layout -I../../../dist/include/necko -I../../../di
st/include/pref -I../../../dist/include/uconv -I../../../dist/include/unicharuti
l -I../../../dist/include/widget -I../../../dist/include/xpconnect -I../../../di
st/include   -I../../../dist/include/dom -I../../../dist/include/nspr     -I../.
./../dist/sdk/include       -fno-rtti -fno-exceptions -Wall -Wconversion -Wpoint
er-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dt
or -Wcast-align -Wno-long-long -pedantic -fno-strict-aliasing -mms-bitfields -pi
pe  -DNDEBUG -DTRIMMED -O   -DWINVER=0x501 -D_WIN32_WINNT=0x501 -D_WIN32_IE=0x05
00 -DX_DISPLAY_MISSING=1 -DMOZILLA_VERSION=\"1.9b4pre\" -DMOZILLA_VERSION_U=1.9b
4pre -DHAVE_SNPRINTF=1 -D_WINDOWS=1 -D_WIN32=1 -DWIN32=1 -DXP_WIN=1 -DXP_WIN32=1
 -DHW_THREADS=1 -DSTDC_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OCKING=1 -DMOZ_RDF=1 -DMOZ_MORKREADER=1 -DMOZ_DLL_SUFFIX=\".dll\" -DJS
_THREADSAFE=1 -DMOZILLA_LOCALE_VERSION=\"1.9a1\" -DMOZILLA_REGION_VERSION=\"1.9a
1\" -DMOZILLA_SKIN_VERSION=\"1.8\"  -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT /cygdr
ive/d/mozilla/mozilla/dom/src/json/nsJSON.cpp
d:/mozilla/mozilla/dom/src/json/nsJSON.cpp: In member function `nsresult nsJSONL
istener::HandleString(const PRUnichar*, PRUint32)':
d:/mozilla/mozilla/dom/src/json/nsJSON.cpp:1276: error: invalid conversion from
`const PRUnichar*' to `const jschar*'
make[6]: *** [nsJSON.o] Error 1
make[6]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw/dom/src/jso
n'
make[5]: *** [libs] Error 2
make[5]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw/dom/src'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw/dom'
make[3]: *** [libs_tier_gecko] Error 2
make[3]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw'
make[2]: *** [tier_gecko] Error 2
make[2]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw'
make[1]: *** [alldep] Error 2
make[1]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw'
make: *** [alldep] Error 2
Component: General → DOM
Product: Firefox → Core
QA Contact: general → general
Attached patch patchSplinter Review
This patch fixes the build error for me.
Attachment #301912 - Flags: review?
Attachment #301912 - Flags: review? → review+
Comment on attachment 301912 [details] [diff] [review]
patch

wait, can't this be a static cast?
Attachment #301912 - Flags: review+ → review?
If you mean whether I could replace reinterpret_cast with static_cast, mingw doesn't seem to accept that.
Attachment #301912 - Flags: review? → review+
Assignee: nobody → martijn.martijn
I confirm that Martijn's patch is working well in Mingw and also in my VC8 build.
../mozilla/dom/src/json/nsJSON.cpp now compiles just fine without any warnings.
Blocks: mingw
Attachment #301912 - Flags: approval1.9?
Attachment #301912 - Flags: approval1.9? → approval1.9+
Checking in nsJSON.cpp;
/cvsroot/mozilla/dom/src/json/nsJSON.cpp,v  <--  nsJSON.cpp
new revision: 1.5; previous revision: 1.4
done

Checked in on trunk.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: