aboutsummaryrefslogtreecommitdiff
path: root/lib/locking-selftest-rlock-hardirq.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2021-08-25 11:50:37 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-08-30 10:06:37 -0300
commitedf7b4a2d85e37a1ee77156bddaed4aa6af9c5e1 (patch)
treea23174109d3048dfd42c9da1b165105c716c4bdc /lib/locking-selftest-rlock-hardirq.h
parentcdf32b44678c382a31dc183d9a767306915cda7b (diff)
perf bench inject-buildid: Handle writen() errors
The build on fedora:35 and fedora:rawhide with clang is failing with: 49 41.00 fedora:35 : FAIL clang version 13.0.0 (Fedora 13.0.0~rc1-1.fc35) bench/inject-buildid.c:351:6: error: variable 'len' set but not used [-Werror,-Wunused-but-set-variable] u64 len = 0; ^ 1 error generated. make[3]: *** [/git/perf-5.14.0-rc7/tools/build/Makefile.build:139: bench] Error 2 50 41.11 fedora:rawhide : FAIL clang version 13.0.0 (Fedora 13.0.0~rc1-1.fc35) bench/inject-buildid.c:351:6: error: variable 'len' set but not used [-Werror,-Wunused-but-set-variable] u64 len = 0; ^ 1 error generated. make[3]: *** [/git/perf-5.14.0-rc7/tools/build/Makefile.build:139: bench] Error 2 That 'len' variable is not used at all, so just make sure all the synthesize_RECORD() routines return ssize_t to propagate the writen() return, as it may fail, ditch the 'ret' var and bail out if those routines fail. Fixes: 0bf02a0d80427f26 ("perf bench: Add build-id injection benchmark") Acked-by: Namhyung Kim <namhyung@kernel.org> Link: http://lore.kernel.org/lkml/CAM9d7cgEZNSor+B+7Y2C+QYGme_v5aH0Zn0RLfxoQ+Fy83EHrg@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'lib/locking-selftest-rlock-hardirq.h')
0 files changed, 0 insertions, 0 deletions