Re: [PATCH i-g-t] perf_pmu: Fix some compile warnings with old compilers / 32-bit builds

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

 



Quoting Tvrtko Ursulin (2018-02-19 10:04:08)
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> Correct printf format for uint64_t and one "may be uninitialized".
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> Reported-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

Fixing those two turned up one more!

In file included from ./../lib/igt.h:40:0,
                 from perf_pmu.c:40:
perf_pmu.c: In function ‘__real_main1547’:
./../lib/igt_gt.h:111:2: warning: ‘render_fd’ may be used uninitialized in this function [-Wmaybe-uninitialized]
perf_pmu.c:1761:7: note: ‘render_fd’ was declared here

This compiler is easily confused by longjmps

@@ -1758,7 +1758,7 @@ igt_main
         * Check render nodes are counted.
         */
        igt_subtest_group {
-               int render_fd;
+               int render_fd = -1;
 
Throw that in on top and have a 
Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux