Fix warnings on OpenIndiana (Illumos)

This commit is contained in:
Todd C. Miller
2018-08-30 14:06:18 -06:00
parent 765d99e1f9
commit a924b4610b
4 changed files with 9 additions and 8 deletions

View File

@@ -83,9 +83,9 @@ static struct strtoid_data {
{ "10", 10, NULL, NULL }, { "10", 10, NULL, NULL },
{ "-2", -2, NULL, NULL }, { "-2", -2, NULL, NULL },
#if SIZEOF_ID_T != SIZEOF_LONG_LONG #if SIZEOF_ID_T != SIZEOF_LONG_LONG
{ "-2", 4294967294U, NULL, NULL }, { "-2", (id_t)4294967294U, NULL, NULL },
#endif #endif
{ "4294967294", 4294967294U, NULL, NULL }, { "4294967294", (id_t)4294967294U, NULL, NULL },
{ NULL, 0, NULL, NULL } { NULL, 0, NULL, NULL }
}; };
@@ -128,7 +128,7 @@ static struct strtomode_data {
{ "755", 0755 }, { "755", 0755 },
{ "007", 007 }, { "007", 007 },
{ "7", 7 }, { "7", 7 },
{ "8", -1 }, { "8", (mode_t)-1 },
{ NULL, 0 } { NULL, 0 }
}; };

View File

@@ -51,7 +51,7 @@ struct parse_gids_test {
static const GETGROUPS_T test1_out[] = { 0, 1, 2, 3, 4 }; static const GETGROUPS_T test1_out[] = { 0, 1, 2, 3, 4 };
static const GETGROUPS_T test2_out[] = { 1, 2, 3, 4 }; static const GETGROUPS_T test2_out[] = { 1, 2, 3, 4 };
static const GETGROUPS_T test3_out[] = { 0, 1, -2, 3, 4 }; static const GETGROUPS_T test3_out[] = { 0, 1, (gid_t)-2, 3, 4 };
/* XXX - test syntax errors too */ /* XXX - test syntax errors too */
static struct parse_gids_test test_data[] = { static struct parse_gids_test test_data[] = {

View File

@@ -1231,7 +1231,8 @@ oom:
} }
#ifdef HAVE_LDAP_SASL_INTERACTIVE_BIND_S #ifdef HAVE_LDAP_SASL_INTERACTIVE_BIND_S
static unsigned int (*sudo_gss_krb5_ccache_name)(unsigned int *minor_status, const char *name, const char **old_name); typedef unsigned int (*sudo_gss_krb5_ccache_name_t)(unsigned int *minor_status, const char *name, const char **old_name);
static sudo_gss_krb5_ccache_name_t sudo_gss_krb5_ccache_name;
static int static int
sudo_set_krb5_ccache_name(const char *name, const char **old_name) sudo_set_krb5_ccache_name(const char *name, const char **old_name)
@@ -1242,7 +1243,7 @@ sudo_set_krb5_ccache_name(const char *name, const char **old_name)
debug_decl(sudo_set_krb5_ccache_name, SUDOERS_DEBUG_LDAP) debug_decl(sudo_set_krb5_ccache_name, SUDOERS_DEBUG_LDAP)
if (!initialized) { if (!initialized) {
sudo_gss_krb5_ccache_name = sudo_gss_krb5_ccache_name = (sudo_gss_krb5_ccache_name_t)
sudo_dso_findsym(SUDO_DSO_DEFAULT, "gss_krb5_ccache_name"); sudo_dso_findsym(SUDO_DSO_DEFAULT, "gss_krb5_ccache_name");
initialized = true; initialized = true;
} }

View File

@@ -42,14 +42,14 @@ extern size_t base64_encode(const unsigned char *in, size_t in_len, char *out, s
__dso_public int main(int argc, char *argv[]); __dso_public int main(int argc, char *argv[]);
static char bstring1[] = { 0xea, 0xb8, 0xa2, 0x71, 0xef, 0x67, 0xc1, 0xcd, 0x0d, 0xd9, 0xa6, 0xaa, 0xa8, 0x24, 0x77, 0x2a, 0xfc, 0x6f, 0x76, 0x37, 0x1b, 0xed, 0x9e, 0x1a, 0x90, 0x5f, 0xcf, 0xbc, 0x00 }; static unsigned char bstring1[] = { 0xea, 0xb8, 0xa2, 0x71, 0xef, 0x67, 0xc1, 0xcd, 0x0d, 0xd9, 0xa6, 0xaa, 0xa8, 0x24, 0x77, 0x2a, 0xfc, 0x6f, 0x76, 0x37, 0x1b, 0xed, 0x9e, 0x1a, 0x90, 0x5f, 0xcf, 0xbc, 0x00 };
struct base64_test { struct base64_test {
const char *ascii; const char *ascii;
const char *encoded; const char *encoded;
} test_strings[] = { } test_strings[] = {
{ {
bstring1, (char *)bstring1,
"6riice9nwc0N2aaqqCR3Kvxvdjcb7Z4akF/PvA==" "6riice9nwc0N2aaqqCR3Kvxvdjcb7Z4akF/PvA=="
}, },
{ {