OSDN Git Service

gallium/aux/util/u_cpu_detect.h: Fix -Wsign-compare warning in u_cpu_detect.c
authorGert Wollny <gert.wollny@collabora.com>
Tue, 5 Jun 2018 11:59:06 +0000 (13:59 +0200)
committerGert Wollny <gw.fossdev@gmail.com>
Wed, 20 Jun 2018 09:08:28 +0000 (11:08 +0200)
commit8a6e3f0c5daa196f39adbf842b356bfb00a8fd13
treef449967b6a9b941eeb3f7daf97e945a5c8482d06
parent33f4e8a04396e3b2b3a8fd79e79fc6f268ee9653
gallium/aux/util/u_cpu_detect.h: Fix -Wsign-compare warning in u_cpu_detect.c

Change the type of util_cpu_caps::nr_cpus to int because sysconfig
returns a signed value, fixes:

u_cpu_detect.c: In function 'util_cpu_detect':
u_cpu_detect.c:317:30: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
    if (util_cpu_caps.nr_cpus == -1)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/auxiliary/util/u_cpu_detect.h