Occurences of uninitialized variables being used before being set (gfx/src)

RESOLVED WORKSFORME

Status

()

Core
Layout
P3
normal
RESOLVED WORKSFORME
18 years ago
7 years ago

People

(Reporter: Rich Burridge, Unassigned)

Tracking

Trunk
mozilla1.0.1
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
For more details on this problem, see:

http://bugzilla.mozilla.org/show_bug.cgi?id=59652

This bug is just for the warnings in various source files in the GTK
Embedding Widget module:

nsBlender.cpp:267: warning: `PRUint32 srccolor' might be used uninitialized in
this function
nsBlender.cpp:267: warning: `PRUint32 secsrccolor' might be used uninitialized
in this function
nsBlender.cpp:354: warning: `PRUint32 srccolor' might be used uninitialized in
this function
nsBlender.cpp:354: warning: `PRUint32 secsrccolor' might be used uninitialized
in this function
nsBlender.cpp:449: warning: `PRUint16 srccolor' might be used uninitialized in
this function
nsBlender.cpp:449: warning: `PRUint16 secsrccolor' might be used uninitialized
in this function
----
nsFontMetricsGTK.cpp:2112: warning: `class nsFontGTK * p' might be used
uninitialized in this function
----
nsGfxFactoryGTK.cpp:60: warning: `class nsIScriptableRegion * inst' might be
used uninitialized in this function
----
nsImageGTK.cpp:589: warning: `unsigned int pix' might be used uninitialized in
this function
../../../dist/include/nsAReadableString.h:1085: warning: `int whichString' might
be used uninitialized in this function
----
(Reporter)

Updated

18 years ago
Blocks: 59652

Updated

17 years ago
Component: GTK Embedding Widget → Layout
Target Milestone: --- → mozilla1.0

Updated

17 years ago
Status: NEW → ASSIGNED

Comment 1

17 years ago
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 
(you can query for this string to delete spam or retrieve the list of bugs I've 
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1

Comment 2

17 years ago
Currently ( http://tinderbox.mozilla.org/SeaMonkey/warn1013026020.23864.html -
Wed, 06 Feb 2002 15:07) gfx/src has the following warnings:

gfx/src/gtk/nsFontMetricsGTK.cpp:2950
 `class nsFontGTK * p' might be used uninitialized in this function

gfx/src/gtk/nsGfxFactoryGTK.cpp:91
 `class nsIScriptableRegion * inst' might be used uninitialized in this function

gfx/src/gtk/nsImageGTK.cpp:1855
 `PRUint32 alphaStride' might be used uninitialized in this function

gfx/src/gtk/nsImageGTK.cpp:942
 `unsigned int pix' might be used uninitialized in this function

gfx/src/x11shared/nsXFontAAScaledBitmap.cpp:318
 `struct XChar2b * aChar2b' might be used uninitialized in this function
Summary: Occurances of uninitialized variables being used before being set. → Occurances of uninitialized variables being used before being set (gfx/src)

Comment 3

17 years ago
There are only two such warnings left in gfx/src:

1)
gfx/src/gtk/nsGfxFactoryGTK.cpp:91
 `class nsIScriptableRegion * inst' might be used uninitialized in this function

There and uninitialized pointer will be compared to null in rgn is null (this
code was checked in by Blizzard).

2)
gfx/src/gtk/nsImageGTK.cpp:942
 `unsigned int pix' might be used uninitialized in this function

Here, if ximage->bits_per_pixel turns out to be nonsense (e.g. not one of 1, 4,
8, 16, 24 or 32), unpredicatble random things will start happening...

P.S. Trying to make 1.0 as warnings-free as possible...
Keywords: mozilla1.0

Comment 4

16 years ago
Not sure how gfx and gfx2 are related, but here is another one of those:

3)
gfx2/src/gfxImageFrame.cpp:72
 `enum nsMaskRequirements maskReq' might be used uninitialized in this function

There if gfxImageFrame::Init is called with unsupported gfx_format, then
mImage->Init will be called with uninitialized nsMaskRequirements

Updated

16 years ago
Summary: Occurances of uninitialized variables being used before being set (gfx/src) → Occurences of uninitialized variables being used before being set (gfx/src)
Depends on: 202594
No longer blocks: 179819

Updated

11 years ago
Assignee: pavlov → nobody
Status: ASSIGNED → NEW
QA Contact: pavlov → layout

Comment 5

7 years ago
The only error which remains in gfx/src (using gcc 4.6.1 on linux) is 
mozilla-central/gfx/src/nsDeviceContext.cpp:829:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Comment 6

7 years ago
Hence closing this bug as uninitialized errors does not exists in gfx/src.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.