[PATCH 14/36] gendispatch: Add 'G_GNUC_WARN_UNUSED_RESULT' to output of 'aclheader'

Peter Krempa posted 36 patches 3 years, 1 month ago
There is a newer version of this series
[PATCH 14/36] gendispatch: Add 'G_GNUC_WARN_UNUSED_RESULT' to output of 'aclheader'
Posted by Peter Krempa 3 years, 1 month ago
Require check of return value of the ACL checking functions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/rpc/gendispatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index 5f2b163ea0..54d55d91e7 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -2182,7 +2182,7 @@ elsif ($mode eq "client") {
             }

             if ($mode eq "aclheader") {
-                print "extern $ret $apiname(" . join(", ", @argdecls) . ");\n";
+                print "extern $ret $apiname(" . join(", ", @argdecls) . ") G_GNUC_WARN_UNUSED_RESULT;\n";
             } else {
                 my @argvars;
                 push @argvars, "mgr";
-- 
2.38.1
Re: [PATCH 14/36] gendispatch: Add 'G_GNUC_WARN_UNUSED_RESULT' to output of 'aclheader'
Posted by Pavel Hrdina 3 years, 1 month ago
On Thu, Jan 05, 2023 at 05:30:03PM +0100, Peter Krempa wrote:
> Require check of return value of the ACL checking functions.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>  src/rpc/gendispatch.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>