summaryrefslogtreecommitdiff
path: root/tests/core_getclient.c
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2019-04-23 20:01:20 -0400
committerLyude Paul <lyude@redhat.com>2019-05-07 17:37:59 -0400
commit6d404244a0e22601ffa121ee5c1e337451339719 (patch)
tree2bab15512cd9cf332a2538e251769263239a6c1b /tests/core_getclient.c
parent998288337d87b9fac8ae3a2f06ee97bfa9bfdfa3 (diff)
lib/aux: Typecast gettid() as pid_t
Partly, for correctness. But mostly because not typecasting properly causes the gettid() macro provided by newer glibc to be typed as pid_t (aka int), while ours is typed as long. Causing annoying warnings: [158/846] Compiling C object 'tests/59830eb@@drm_import_export@exe/drm_import_export.c.o'. In file included from ../../mnt/vol/lib/drmtest.h:39, from ../../mnt/vol/lib/igt.h:27, from ../../mnt/vol/tests/drm_import_export.c:27: ../../mnt/vol/tests/drm_import_export.c: In function ‘test_thread’: ../../mnt/vol/tests/drm_import_export.c:123:12: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘__pid_t’ {aka ‘int’} [-Wformat=] 123 | igt_debug("start %ld\n", gettid()); | ^~~~~~~~~~~~~ ~~~~~~~~ | | | __pid_t {aka int} ../../mnt/vol/lib/igt_core.h:875:64: note: in definition of macro ‘igt_debug’ 875 | #define igt_debug(f...) igt_log(IGT_LOG_DOMAIN, IGT_LOG_DEBUG, f) | ^ ../../mnt/vol/tests/drm_import_export.c:123:21: note: format string is defined here 123 | igt_debug("start %ld\n", gettid()); | ~~^ | | | long int | %d So, typecast gettid() as pid_t and update all of our callers accordingly Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'tests/core_getclient.c')
0 files changed, 0 insertions, 0 deletions