Closed Bug 332701 Opened 18 years ago Closed 14 years ago

build fails in nsDocumentViewer.cpp due to unguarded use of SetUseAltDC if NS_PRINT_PREVIEW undefined

Categories

(Core :: Layout, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: zanchey, Assigned: timeless)

References

Details

Attachments

(1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

Checked out MOZILLA_1_8 branch to build Minimo.

Build process died on layout/base/nsDocumentViewer.cpp

timeless investigated via IRC - indicated that 
 859         mDeviceContext->SetUseAltDC(kUseAltDCFor_SURFACE_DIM, PR_TRUE);
used unguarded (I am not a C programmer, I don't actually know what this means)

Reproducible: Always

Steps to Reproduce:
1. make -f client.mk build
or 
1. make -f client.mk configure
2. cd layout/base/
3. make

Actual Results:  
c++ -o nsDocumentViewer.o -c  -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -DEXPORT_XPTI_API -D_IMPL_NS_COM_OBSOLETE -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET  -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\" -DBUILD_ID=0000000000 -D_IMPL_NS_LAYOUT -I. -I./../generic -I./../forms -I./../tables -I./../printing -I./../xul/base/src -I./../../content/base/src -I./../../content/events/src -I./../../content/xbl/src -I./../../view/src  -I../../dist/include/xpcom -I../../dist/include/string -I../../dist/include/dom -I../../dist/include/content -I../../dist/include/xul -I../../dist/include/xuldoc -I../../dist/include/gfx -I../../dist/include/widget -I../../dist/include/view -I../../dist/include/necko -I../../dist/include/docshell -I../../dist/include/webshell -I../../dist/include/webbrwsr -I../../dist/include/uriloader -I../../dist/include/js -I../../dist/include/xpconnect -I../../dist/include/plugin -I../../dist/include/locale -I../../dist/include/pref -I../../dist/include/imglib2 -I../../dist/include/unicharutil -I../../dist/include/htmlparser -I../../dist/include/util -I../../dist/include/windowwatcher -I../../dist/include/accessibility -I../../dist/include/shistory -I../../dist/include   -I../../dist/include/layout -I../../dist/include/nspr    -I../../dist/sdk/include -I/usr/X11R6/include   -fPIC  -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -ffunction-sections -O2  -I/usr/X11R6/include -DMOZILLA_CLIENT -include ../../mozilla-config.h -Wp,-MD,.deps/nsDocumentViewer.pp nsDocumentViewer.cpp
nsDocumentViewer.cpp: In member function `nsresult 
   DocumentViewerImpl::InitInternal(nsIWidget*, nsISupports*, 
   nsIDeviceContext*, const nsRect&, int, int, int)':
nsDocumentViewer.cpp:858: error: `SetAltDevice' undeclared (first use this 
   function)
nsDocumentViewer.cpp:858: error: (Each undeclared identifier is reported only 
   once for each function it appears in.)
nsDocumentViewer.cpp:859: error: `kUseAltDCFor_SURFACE_DIM' undeclared (first 
   use this function)
nsDocumentViewer.cpp:859: error: `SetUseAltDC' undeclared (first use this 
   function)
nsDocumentViewer.cpp: In member function `virtual nsresult 
   DocumentViewerImpl::Hide()':
nsDocumentViewer.cpp:1972: warning: unused variable `PRBool is_in_print_mode'
nsDocumentViewer.cpp: In member function `virtual nsresult 
   DocumentViewerImpl::SetPageMode(int, nsIPrintSettings*)':
nsDocumentViewer.cpp:4295: warning: unused variable `nsresult rv'
nsDocumentViewer.cpp:4302:2: warning: no newline at end of file
../../dist/include/xpcom/nsISupportsUtils.h: At top level:
nsDocumentViewer.cpp:4093: warning: `void ResetFocusState(nsIDocShell*)' 
   defined but not used
make[5]: *** [nsDocumentViewer.o] Error 1


nsDocumentViewer.cpp is 1.442.4.8 from MOZILLA_1_8 branch
Depends on bug 244055 according to timeless.
Depends on: 244055
Assignee: dougt → nobody
Component: Build Config → Layout
Product: Minimo → Core
QA Contact: chofmann → layout
Version: WinCE → Trunk
Attached patch this patch is all i'm doing (obsolete) — Splinter Review
i'm not adopting this bug. there are three people who can do that. i'm posting this patch and i expect one of them to do something about it.
Attachment #217155 - Flags: superreview?(roc)
Attachment #217155 - Flags: review?(sharparrow1)
Attachment #217155 - Flags: review?(atremon)
Comment on attachment 217155 [details] [diff] [review]
this patch is all i'm doing

missed #ifdef NS_PRINT_PREVIEW,

Please accept my apologies .
Attachment #217155 - Flags: review?(atremon) → review+
Attachment #217155 - Flags: superreview?(roc)
Attachment #217155 - Flags: superreview+
Attachment #217155 - Flags: review?(sharparrow1)
Attachment #217155 - Flags: review+
Alexandre, would you mind patching the OOM error?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 217155 [details] [diff] [review]
this patch is all i'm doing

mozilla/layout/base/nsDocumentViewer.cpp 	1.477
Attachment #217155 - Attachment is obsolete: true
Assignee: nobody → atremon
Alexandre: patching the oom error means fixing the code, not removing my complaint that the code is bad.
I backed out the change that removed that comment.  Might want to spin that off into a separate bug, though.
i claim the build doesn't fail anymore and thus this bug is FIXED. if someone cares about the other stuff, they need to use new bugs.

-- this is part of my effort to clean up my buglist
Assignee: atremon → timeless
Status: NEW → RESOLVED
Closed: 14 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: