diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-03-11 13:48:07 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-03-11 13:48:07 -0400 |
commit | 9fd13e6773371c82b9799a5bda7c96ffa5cafe8c (patch) | |
tree | b1a4adc1208ad34415b4615b74f3f73729fbd1e6 /src/i915_render.c | |
parent | 02c0ffb1d8112a6fb03f9c8eae9ec1a1fca123ef (diff) |
Silence warnings about possible uninitialize use of dst_format.
Whoa, gcc got a lot smarter about warnings. If iXXX_get_dest_format()
doesn't support the picture format passed in it won't initialize the
uint32_t pointed to by dst_format and return FALSE.
What gcc now can detect is if dst_format is used without checking the
return value, it might be used uninitialized. This patch makes sure
we always check the return value before using dst_format.
Diffstat (limited to 'src/i915_render.c')
-rw-r--r-- | src/i915_render.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/i915_render.c b/src/i915_render.c index ca85bf73..0142f5e5 100644 --- a/src/i915_render.c +++ b/src/i915_render.c @@ -322,7 +322,8 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture, IntelEmitInvarientState(pScrn); *pI830->last_3d = LAST_3D_RENDER; - i915_get_dest_format(pDstPicture, &dst_format); + if (!i915_get_dest_format(pDstPicture, &dst_format)) + return FALSE; dst_offset = intel_get_pixmap_offset(pDst); dst_pitch = intel_get_pixmap_pitch(pDst); FS_LOCALS(20); |