Use %s instead of %S to print strings in printf format

gcc reported the following warnings:

    libqpol/policy_extend.c: In function 'qpol_avrule_get_syn_avrule_iter':
    libqpol/policy_extend.c:1219:3: warning: format '%S' expects
    argument of type 'wchar_t *', but argument 4 has type 'char *'
    [-Wformat=]
       ERR(policy, "%S", strerror(error));
       ^
    libqpol/policy_extend.c: In function 'qpol_terule_get_syn_terule_iter':
    libqpol/policy_extend.c:1320:3: warning: format '%S' expects
    argument of type 'wchar_t *', but argument 4 has type 'char *'
    [-Wformat=]
       ERR(policy, "%S", strerror(error));
       ^
This commit is contained in:
Nicolas Iooss 2014-11-01 14:23:09 +01:00 committed by Chris PeBenito
parent ee7064a711
commit 8e488c23f1

View File

@ -1216,7 +1216,7 @@ int qpol_avrule_get_syn_avrule_iter(const qpol_policy_t * policy, const struct q
/* build key */
if (!(key = calloc(1, sizeof(qpol_syn_rule_key_t)))) {
error = errno;
ERR(policy, "%S", strerror(error));
ERR(policy, "%s", strerror(error));
goto err;
}
@ -1317,7 +1317,7 @@ int qpol_terule_get_syn_terule_iter(const qpol_policy_t * policy, const struct q
/* build key */
if (!(key = calloc(1, sizeof(qpol_syn_rule_key_t)))) {
error = errno;
ERR(policy, "%S", strerror(error));
ERR(policy, "%s", strerror(error));
goto err;
}