mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 13:58:22 +00:00
- Add configure check for the existence of asprint(3).
- Add -Wall to compilation (is there a way to only define this in the toplevel Makefile.am and have it propogate down?) - fix warnings once -Wall was enabled: - no asprintf prototype due to _GNU_SOURCE not being defined - possible uninitialezed use in scanner.l - printf's that expected ints but were passed longs in the testsuite
This commit is contained in:
@@ -6,7 +6,6 @@ AM_PROG_LEX
|
||||
AC_PROG_YACC
|
||||
|
||||
AC_PATH_PROG([SWIG], [swig])
|
||||
|
||||
|
||||
PROG_POD2MAN
|
||||
|
||||
@@ -57,6 +56,8 @@ AM_CONDITIONAL(BUILD_ROOTLIB, test x$enable_rootlib = xyes)
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(unistd.h stdint.h)
|
||||
|
||||
AC_CHECK_FUNCS(asprintf)
|
||||
|
||||
AM_PROG_CC_C_O
|
||||
AC_C_CONST
|
||||
AM_PROG_LIBTOOL
|
||||
|
@@ -2,10 +2,12 @@ INCLUDES = $(all_includes)
|
||||
|
||||
BUILT_SOURCES = grammar.h scanner.h
|
||||
AM_YFLAGS = -d -p aalogparse_
|
||||
|
||||
scanner.h:
|
||||
AM_CFLAGS = @CFLAGS@ -D_GNU_SOURCE -Wall
|
||||
scanner.h: scanner.l
|
||||
$(LEX) scanner.l
|
||||
|
||||
scanner.c: scanner.l
|
||||
|
||||
changehatdir = $(includedir)/sys
|
||||
changehat_HEADERS = apparmor.h
|
||||
|
||||
|
@@ -117,7 +117,7 @@ typedef struct
|
||||
aa_record_event_type event; /* Event type */
|
||||
long pid; /* PID of the program logging the message */
|
||||
long task;
|
||||
long magic_token;
|
||||
unsigned long magic_token;
|
||||
long epoch; /* example: 12345679 */
|
||||
unsigned int audit_sub_id; /* example: 12 */
|
||||
|
||||
|
@@ -8,8 +8,6 @@
|
||||
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE /* for asprintf */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@@ -102,7 +102,7 @@ audit "audit"
|
||||
%%
|
||||
%{
|
||||
char string_buf[512];
|
||||
char *string_buf_ptr;
|
||||
char *string_buf_ptr = string_buf; /* assignment to quiet gcc warning */
|
||||
|
||||
/* yy_flex_debug = 1; */
|
||||
%}
|
||||
|
@@ -5,11 +5,12 @@ AUTOMAKE_OPTIONS = dejagnu
|
||||
INCLUDES = -I. -I$(top_srcdir)/src
|
||||
|
||||
AM_CPPFLAGS = $(DEBUG_FLAGS) -DLOCALEDIR=\"${localedir}\"
|
||||
AM_CFLAGS = -Wall
|
||||
|
||||
noinst_PROGRAMS = test_multi.multi
|
||||
|
||||
test_multi_multi_SOURCES = test_multi.c
|
||||
test_multi_multi_CFLAGS = $(CFLAGS)
|
||||
test_multi_multi_CFLAGS = $(CFLAGS) -Wall
|
||||
test_multi_multi_LDFLAGS = $(LDFLAGS) ../src/.libs/libapparmor.a
|
||||
|
||||
clean-local:
|
||||
|
@@ -131,7 +131,7 @@ int print_results(aa_log_record *record)
|
||||
}
|
||||
if (record->task != 0)
|
||||
{
|
||||
printf("Task: %i\n", record->task);
|
||||
printf("Task: %ld\n", record->task);
|
||||
}
|
||||
if (record->parent != NULL)
|
||||
{
|
||||
@@ -139,7 +139,7 @@ int print_results(aa_log_record *record)
|
||||
}
|
||||
if (record->magic_token != 0)
|
||||
{
|
||||
printf("Token: %i\n", record->magic_token);
|
||||
printf("Token: %lu\n", record->magic_token);
|
||||
}
|
||||
if (record->info != NULL)
|
||||
{
|
||||
@@ -147,7 +147,7 @@ int print_results(aa_log_record *record)
|
||||
}
|
||||
if (record->pid != 0)
|
||||
{
|
||||
printf("PID: %i\n", record->pid);
|
||||
printf("PID: %ld\n", record->pid);
|
||||
}
|
||||
if (record->active_hat != NULL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user