logd: fix ignored return values in set{gid,uid}
authorPetr Štetiar <ynezz@true.cz>
Mon, 22 Mar 2021 17:22:14 +0000 (18:22 +0100)
committerPetr Štetiar <ynezz@true.cz>
Mon, 22 Mar 2021 17:22:14 +0000 (18:22 +0100)
commit41664054b8b1bc19d842421c49d1b4d612ff8297
treecaa5be02ef0a1032b4f772d1a101dd794f47bcf0
parent9ef886819dd48303d8ced4cdbc9afbf32682535c
logd: fix ignored return values in set{gid,uid}

Ubuntu 18.05 with gcc-7.5 yields following error:

 ubox/log/logd.c:263:3: error: ignoring return value of ‘setuid’, declared with attribute warn_unused_result [-Werror=unused-result]
   setuid(p->pw_uid);
   ^~~~~~~~~~~~~~~~~
 ubox/log/logd.c:264:3: error: ignoring return value of ‘setgid’, declared with attribute warn_unused_result [-Werror=unused-result]
   setgid(p->pw_gid);
   ^~~~~~~~~~~~~~~~~

Fixes: 9ef886819dd4 ("logd: self-degrade to 'logd' user after opening pipes")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
log/logd.c