All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Lautrbach <plautrba@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>, selinux@tycho.nsa.gov
Subject: Re: [PATCH] Fix -Wformat errors
Date: Fri, 13 Mar 2015 14:37:32 +0100	[thread overview]
Message-ID: <5502E81C.50208@redhat.com> (raw)
In-Reply-To: <5502E02C.7060306@tycho.nsa.gov>

[-- Attachment #1: Type: text/plain, Size: 876 bytes --]

On 03/13/2015 02:03 PM, Stephen Smalley wrote:
> On 03/13/2015 08:55 AM, Petr Lautrbach wrote:
>> Fixes two types of errors which appear when building with gcc-5.0.0
>>
>> - format ‘%d’ expects argument of type ‘int’, but argument X has type ‘unsigned int’
>> - format ‘%a’ expects argument of type ‘float *’, but argument X has type ‘char **’
> 
> %a is the dynamic allocation conversion specified in glibc, at least
> prior to glibc 2.7, and is available if _GNU_SOURCE is specified (which
> is set in CFLAGS in libselinux/src/Makefile).  So your change will break
> on older glibc IIUC.
> 

%ms format string is already used in
libselinux/utils/sefcontext_compile.c and policycoreutils/hll/pp/pp.c


The other way to fix it would be to use -std=gnu89 everywhere since
gcc-5 defaults to -std=gnu11.

Petr
--
Petr Lautrbach



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-03-13 13:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 12:55 [PATCH] Fix -Wformat errors Petr Lautrbach
2015-03-13 13:03 ` Stephen Smalley
2015-03-13 13:37   ` Petr Lautrbach [this message]
2015-03-13 13:40     ` Stephen Smalley
2015-03-13 14:54 ` Petr Lautrbach
2015-03-13 18:16   ` Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5502E81C.50208@redhat.com \
    --to=plautrba@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.