public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix userspace audit compiler warnings
@ 2013-02-09  3:12 Tyler Hicks
  2013-02-09  3:12 ` [PATCH 1/3] Don't ignore the return value of asprintf() Tyler Hicks
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Tyler Hicks @ 2013-02-09  3:12 UTC (permalink / raw)
  To: Steve Grubb; +Cc: linux-audit

These patches fix the majority of compiler warnings seen when building audit on 
Ubuntu.

The audit codebase rarely checked the return value of asprintf(), which can 
cause problems if memory allocation fails. Most of the missing checks are
in libauparse, which is probably fine but who knows what will use it in the 
future. Also, all of these warnings clutter up the build output and make it
more difficult to see more serious warnings.

The second patch contains some other ignored return value warnings fixes, as well. These show up on Ubuntu when the -D_FORTIFY_SOURCE=2 and -Wunused-return flags are in use. They don't seem to show up on Fedora in the same situation, but I believe that they should, despite casting the function's return value to (void). Despite that, they looked to be areas in the code that should at least log a message or even prevent auditd from running in some situations.  

The last patch cleans up two const warnings.

There are still a number of warnings in the zos-remote audispd plugin that I
didn't get to and a few that look ok to me in the embedded libev code.

Tyler

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-09 18:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-09  3:12 [PATCH 0/3] Fix userspace audit compiler warnings Tyler Hicks
2013-02-09  3:12 ` [PATCH 1/3] Don't ignore the return value of asprintf() Tyler Hicks
2013-02-09 16:50   ` Steve Grubb
2013-02-09  3:12 ` [PATCH 2/3] Fix Wunused-return warnings Tyler Hicks
2013-02-09 16:57   ` Steve Grubb
2013-02-09 18:35     ` Tyler Hicks
2013-02-09  3:12 ` [PATCH 3/3] Fix discards 'const' qualifier from pointer target type warnings Tyler Hicks
2013-02-09 17:22   ` Steve Grubb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox