From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tyler Hicks Subject: [PATCH 0/3] Fix userspace audit compiler warnings Date: Fri, 8 Feb 2013 19:12:32 -0800 Message-ID: <1360379555-1910-1-git-send-email-tyhicks@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: Steve Grubb Cc: linux-audit@redhat.com List-Id: linux-audit@redhat.com 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