diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2014-09-05 14:45:09 +0300 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2014-09-05 14:45:09 +0300 |
commit | 974c0940603c1ee9487124ea96f94767d965910d (patch) | |
tree | 02ebc9f0dca2aeacc1cde599a4e8008eae87570b /src/screenshooter.c | |
parent | 052917aa2aa4f4e1a82d5316911a162c37af7bdc (diff) | |
download | weston-974c0940603c1ee9487124ea96f94767d965910d.tar.gz |
fix asprintf warnings
Fix recently introduced compiler warnings:
desktop-shell/shell.c: In function 'shell_configuration':
desktop-shell/shell.c:588:10: warning: ignoring return value of
'asprintf', declared with attribute warn_unused_result [-Wunused-result]
src/screenshooter.c: In function ‘screenshooter_binding’:
src/screenshooter.c:291:10: warning: ignoring return value of
‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
src/text-backend.c: In function ‘text_backend_configuration’:
src/text-backend.c:944:10: warning: ignoring return value of ‘asprintf’,
declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'src/screenshooter.c')
-rw-r--r-- | src/screenshooter.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/screenshooter.c b/src/screenshooter.c index af2c754a..cafbf107 100644 --- a/src/screenshooter.c +++ b/src/screenshooter.c @@ -287,9 +287,15 @@ screenshooter_binding(struct weston_seat *seat, uint32_t time, uint32_t key, { struct screenshooter *shooter = data; char *screenshooter_exe; + int ret; - asprintf(&screenshooter_exe, "%s/%s", weston_config_get_libexec_dir(), - "/weston-screenshooter"); + ret = asprintf(&screenshooter_exe, "%s/%s", + weston_config_get_libexec_dir(), + "/weston-screenshooter"); + if (ret < 0) { + weston_log("Could not construct screenshooter path.\n"); + return; + } if (!shooter->client) shooter->client = weston_client_launch(shooter->ec, |