linux-audit / audit-userspace

Linux audit userspace repository
GNU General Public License v2.0
567 stars 201 forks source link

normalize-llist.c: fix compile error #371

Closed zpc0 closed 2 months ago

zpc0 commented 2 months ago

On Fedora 40 system, -Wimplictit-function-declaration error is occur when compiling normalize-llist.c printf(). Including stdio.h will fix this.

This can be applied to 3.1 branch.

stevegrubb commented 2 months ago

Thanks for the patch. This came from a recent PR. Auparse is a library and should not be calling printf. I have a feeling we should just delete the call to printf. Maybe this is a good reason to change cllist_append from void to int so its caller can return an error and that is how this failure gets communicated rather than printf.

stevegrubb commented 2 months ago

Actually, there was quite a number of these to fix. I fixed it by returning an error code. Thanks for letting me know about this.

zpc0 commented 2 months ago

@stevegrubb Thank you for creating more better fix! Since projects using release 3.1.4 such as OpenWrt are also affected by this issue, could you backport the fix to 3.1 branch and making the new release? Thanks!