diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2014-01-04 22:37:06 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2014-01-04 22:37:06 +0100 |
commit | 328894237b24e50b8d39f1fe85f9fa7e2d37e5de (patch) | |
tree | dda921d01a32d49b1ebc1d96cf6f8cf5d7c4aa8c | |
parent | 2b8fbc249e8781290e5a05b338b3bc1b700d05e6 (diff) |
Fix compiler warnings in the myldap test
-rw-r--r-- | tests/test_myldap.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/test_myldap.c b/tests/test_myldap.c index d95157f..a8cab6b 100644 --- a/tests/test_myldap.c +++ b/tests/test_myldap.c @@ -2,7 +2,7 @@ test_myldap.c - simple test for the myldap module This file is part of the nss-pam-ldapd library. - Copyright (C) 2007, 2008, 2009, 2011, 2012 Arthur de Jong + Copyright (C) 2007-2014 Arthur de Jong This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -120,10 +120,9 @@ static void test_get(void) assert(entry != NULL); printf("test_myldap: test_get(): got DN %s\n", myldap_get_dn(entry)); /* get some attribute values */ - (void)myldap_get_values(entry, "gidNumber"); - (void)myldap_get_values(entry, "userPassword"); - (void)myldap_get_values(entry, "memberUid"); - (void)myldap_get_values(entry, "member"); + assert(myldap_get_values(entry, "gidNumber") != NULL); + assert(myldap_get_values(entry, "memberUid") == NULL); + assert(myldap_get_values(entry, "member") != NULL); /* perform another search */ printf("test_myldap: test_get(): doing get...\n"); search2 = myldap_search(session, "cn=Test User2,ou=people,dc=test,dc=tld", @@ -413,7 +412,7 @@ static void test_escape(void) } /* the main program... */ -int main(int argc, char *argv[]) +int main(int UNUSED(argc), char UNUSED(*argv[])) { char *srcdir; char fname[100]; |