Message ID | 1447848832-8106-1-git-send-email-nabendu.bikash.maiti@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Nov 18, 2015 at 05:43:52PM +0530, Nabendu Maiti wrote: > Uninitialized variables (width, Height) in intel_check_sprite_plane > leads to compilererror in O1 level. Initialize all declared variables > to fix this issue. > > Signed-off-by: Nabendu Maiti <nabendu.bikash.maiti@intel.com> > --- > drivers/gpu/drm/i915/intel_sprite.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c > index 2b96f33..a5af384 100644 > --- a/drivers/gpu/drm/i915/intel_sprite.c > +++ b/drivers/gpu/drm/i915/intel_sprite.c > @@ -747,7 +747,7 @@ intel_check_sprite_plane(struct drm_plane *plane, > struct drm_framebuffer *fb = state->base.fb; > int crtc_x, crtc_y; > unsigned int crtc_w, crtc_h; > - uint32_t src_x, src_y, src_w, src_h; > + uint32_t src_x = 0, src_y = 0, src_w = 0, src_h = 0; Where exactly are these used without initialization? > struct drm_rect *src = &state->src; > struct drm_rect *dst = &state->dst; > const struct drm_rect *clip = &state->clip; > -- > 1.9.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 2b96f33..a5af384 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -747,7 +747,7 @@ intel_check_sprite_plane(struct drm_plane *plane, struct drm_framebuffer *fb = state->base.fb; int crtc_x, crtc_y; unsigned int crtc_w, crtc_h; - uint32_t src_x, src_y, src_w, src_h; + uint32_t src_x = 0, src_y = 0, src_w = 0, src_h = 0; struct drm_rect *src = &state->src; struct drm_rect *dst = &state->dst; const struct drm_rect *clip = &state->clip;
Uninitialized variables (width, Height) in intel_check_sprite_plane leads to compilererror in O1 level. Initialize all declared variables to fix this issue. Signed-off-by: Nabendu Maiti <nabendu.bikash.maiti@intel.com> --- drivers/gpu/drm/i915/intel_sprite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)