Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 initialize a local varia...



details:   https://anonhg.NetBSD.org/src/rev/90ca8f468dc8
branches:  trunk
changeset: 454828:90ca8f468dc8
user:      chs <chs%NetBSD.org@localhost>
date:      Sat Sep 28 16:14:52 2019 +0000

description:
initialize a local variable to avoid a gcc warning with
certain optimization options.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c        |  6 ++++--
 sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c |  6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (54 lines):

diff -r 77036a61fc47 -r 90ca8f468dc8 sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c   Sat Sep 28 16:02:12 2019 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c   Sat Sep 28 16:14:52 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_lrc.c,v 1.9 2018/08/27 15:09:35 riastradh Exp $  */
+/*     $NetBSD: intel_lrc.c,v 1.10 2019/09/28 16:14:52 chs Exp $       */
 
 /*
  * Copyright © 2014 Intel Corporation
@@ -135,7 +135,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_lrc.c,v 1.9 2018/08/27 15:09:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_lrc.c,v 1.10 2019/09/28 16:14:52 chs Exp $");
 
 #include <drm/drmP.h>
 #include <drm/i915_drm.h>
@@ -684,6 +684,8 @@
        unsigned space;
        int ret;
 
+       space = 0; /* XXX gcc -Wuninitialized */
+
        if (intel_ring_space(ringbuf) >= bytes)
                return 0;
 
diff -r 77036a61fc47 -r 90ca8f468dc8 sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c    Sat Sep 28 16:02:12 2019 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c    Sat Sep 28 16:14:52 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_ringbuffer.c,v 1.9 2018/09/13 08:25:55 mrg Exp $ */
+/*     $NetBSD: intel_ringbuffer.c,v 1.10 2019/09/28 16:14:52 chs Exp $        */
 
 /*
  * Copyright © 2008-2010 Intel Corporation
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_ringbuffer.c,v 1.9 2018/09/13 08:25:55 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_ringbuffer.c,v 1.10 2019/09/28 16:14:52 chs Exp $");
 
 #include <asm/param.h>
 #include <drm/drmP.h>
@@ -2323,6 +2323,8 @@
        unsigned space;
        int ret;
 
+       space = 0; /* XXX gcc -Wuninitialized */
+
        if (intel_ring_space(ringbuf) >= n)
                return 0;
 



Home | Main Index | Thread Index | Old Index