From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Moore Subject: Re: [PATCH] Audit: Fix the format type for size_t variables Date: Wed, 27 Feb 2008 12:45:05 -0500 Message-ID: <200802271245.05595.paul.moore@hp.com> References: <20080227153922.8813.23656.stgit@flek.americas.hpqcorp.net> <1204129321.3206.12.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1204129321.3206.12.camel@localhost.localdomain> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: Eric Paris Cc: linux-audit@redhat.com List-Id: linux-audit@redhat.com On Wednesday 27 February 2008 11:22:01 am Eric Paris wrote: > On Wed, 2008-02-27 at 10:39 -0500, Paul Moore wrote: > > Fix the following compiler warning by using "%zu" as defined in > > C99. > > > > CC kernel/auditsc.o > > kernel/auditsc.c: In function 'audit_log_single_execve_arg': > > kernel/auditsc.c:1074: warning: format '%ld' expects type 'long > > int', but argument 4 has type 'size_t' > > > > Signed-off-by: Paul Moore > > I would have sworn I already saw this patch go by. But I don't see > it in Al's git tree. Perhaps, but it's still in Linus' tree from a few hours ago. > Acked-by: Eric Paris > > > --- > > > > kernel/auditsc.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/kernel/auditsc.c b/kernel/auditsc.c > > index 2087d6d..782262e 100644 > > --- a/kernel/auditsc.c > > +++ b/kernel/auditsc.c > > @@ -1070,7 +1070,7 @@ static int audit_log_single_execve_arg(struct > > audit_context *context, * so we can be sure nothing was lost. > > */ > > if ((i == 0) && (too_long)) > > - audit_log_format(*ab, "a%d_len=%ld ", arg_num, > > + audit_log_format(*ab, "a%d_len=%zu ", arg_num, > > has_cntl ? 2*len : len); > > > > /* > > > > -- > > Linux-audit mailing list > > Linux-audit@redhat.com > > https://www.redhat.com/mailman/listinfo/linux-audit -- paul moore linux security @ hp