Closed Bug 303186 Opened 19 years ago Closed 19 years ago

VS2005: nsXPCOMGlue.cpp compilation error with const char *

Categories

(Core :: XPCOM, defect, P1)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta4

People

(Reporter: mmoy, Assigned: benjamin)

Details

(Whiteboard: [ETA now] needs review (darin) does not block branching)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2 x64; en-US; rv:1.8b3) Gecko/20050801 mmoy CE Deer Park Alpha 2 K8M/64-X07 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2 x64; en-US; rv:1.8b3) Gecko/20050801 mmoy CE Deer Park Alpha 2 K8M/64-X07 nsXPCOMGlue.cpp Building deps for nsXPCOMGlue.cpp /cygdrive/f/Mozilla/mozilla/build/cygwin-wrapper cl -FonsXPCOMGlue.obj -c -D_IMPL_NS_GFX -D_IMPL_NS_MSG_BASE -D_IMPL_NS_WIDGET -DOSTYPE=\"WINNT5.2\" -DOSARCH=\"WINNT\" -DBUILD_ID=0000000000 -DXPCOM_GLUE -I/cygdrive/f/M ozilla/mozilla/xpcom/glue/standalone/../../build -I../../../dist/include/string -I../../../dist/include/xpcom -I../../../dist/include -I../../../dist/include/nspr -I../../../dist/sdk/include -TP -nologo -W3 -Gy -FdnsXPCOMGlue.pdb -DNDEBUG -DTRIMMED -O2 -GL -GS- -fp:fast -arch:SSE2 -DQUEK3 -DQUEK10 -DQUEK14 -DQUEK15 -M D -DX_DISPLAY_MISSING=1 -DMOZILLA_VERSION=\"1.8b4\" -DMOZILLA_VERSION_MAJOR=1 -DMOZILLA_VERSION_MIN OR=8 -DHAVE_SNPRINTF=1 -D_WINDOWS=1 -D_WIN32=1 -DWIN32=1 -DXP_WIN=1 -DXP_WIN32=1 -DHW_THREADS=1 -DWINVER=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_DISTRIBUTION_ID=\"org.mozilla\" -DOJI=1 -DIBMBI DI=1 -DMOZ_VIEW_SOURCE=1 -DMOZ_XPINSTALL=1 -DMOZ_JSLOADER=1 -DMOZ_XTF=1 -DMOZ_MATHML=1 -DMOZ_LOGGING=1 -DMOZ_U SER_DIR=\"Mozilla\" -DMOZ_XUL=1 -DMOZ_PROFILELOCKING=1 -DMOZ_DLL_SUFFIX=\".dll\" -DJS_THREADSAFE=1 -DNS_PRINT_ PREVIEW=1 -DNS_PRINTING=1 -DMOZILLA_LOCALE_VERSION=\"1.8b2\" -DMOZILLA_REGION_VERSION=\"1.8b2\" -DMOZILLA_SKIN _VERSION=\"1.5\" -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT /cygdrive/f/Mozilla/mozilla/xpcom/glue/standalone/nsXP COMGlue.cpp nsXPCOMGlue.cpp f:/Mozilla/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp(107) : warning C4996: 'sprintf' was declared deprecat ed D:\Program Files (x86)\Microsoft Visual Studio 8\VC\INCLUDE\stdio.h(317) : see declaration of 'sprintf ' f:/Mozilla/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp(109) : warning C4996: 'fopen' was declared deprecated D:\Program Files (x86)\Microsoft Visual Studio 8\VC\INCLUDE\stdio.h(235) : see declaration of 'fopen' f:/Mozilla/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp(127) : warning C4996: '_snprintf' was declared deprec ated D:\Program Files (x86)\Microsoft Visual Studio 8\VC\INCLUDE\stdio.h(314) : see declaration of '_snprin tf' f:/Mozilla/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp(475) : error C2440: 'initializing' : cannot convert f rom 'const char *' to 'char *' Conversion loses qualifiers make[5]: *** [nsXPCOMGlue.obj] Error 2 make[5]: Leaving directory `/cygdrive/f/Mozilla/mozilla/xpcom/glue/standalone' make[4]: *** [libs] Error 2 make[4]: Leaving directory `/cygdrive/f/Mozilla/mozilla/xpcom/glue' make[3]: *** [libs] Error 2 make[3]: Leaving directory `/cygdrive/f/Mozilla/mozilla/xpcom' make[2]: *** [tier_2] Error 2 make[2]: Leaving directory `/cygdrive/f/Mozilla/mozilla' make[1]: *** [default] Error 2 make[1]: Leaving directory `/cygdrive/f/Mozilla/mozilla' make: *** [build] Error 2 The problem is in the line: char* xpcomLocation = GRE_GetXPCOMPath(); Adding const to the beginning fixes the problem. Reproducible: Always
Assignee: nobody → dougt
Component: General → XPCOM
Product: Firefox → Core
QA Contact: general → xpcom
Version: unspecified → Trunk
Attachment #191440 - Flags: review?(darin)
Assignee: dougt → benjamin
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.8b4+
Priority: -- → P1
Whiteboard: [ETA now] needs review (darin) does not block branching
Target Milestone: --- → mozilla1.8beta4
Comment on attachment 191440 [details] [diff] [review] xpcom/glue/standalone/nsXPCOMGlue.cpp patch r=darin
Attachment #191440 - Flags: review?(darin) → review+
Attachment #191440 - Flags: approval1.8b4+
Fixed on trunk for 1.8b4
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: