]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Remove C warnings
authorAlexandra Ellwood <lxs@mit.edu>
Mon, 10 Mar 2008 21:51:49 +0000 (21:51 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Mon, 10 Mar 2008 21:51:49 +0000 (21:51 +0000)
Some C++ conventions in the CCAPI tests were producing warnings
on C compilers.  Fixed code to stop producing warnings.

ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20268 dc483132-0cff-0310-8789-dd5450dbe970

src/ccapi/test/simple_lock_test.c
src/ccapi/test/test_ccapi_ccache.c
src/ccapi/test/test_ccapi_ccache.h
src/ccapi/test/test_ccapi_check.c
src/ccapi/test/test_ccapi_constants.c
src/ccapi/test/test_ccapi_constants.h
src/ccapi/test/test_ccapi_iterators.c
src/ccapi/test/test_ccapi_iterators.h
src/ccapi/test/test_ccapi_log.c
src/ccapi/test/test_ccapi_util.c

index d51a58660f9d57b1d49571782e859a725deefbff..26bd74ed906558c19d468179d757e753a20b8b90 100644 (file)
@@ -17,7 +17,7 @@
 #endif
 
 
-void * other_thread () {
+void * other_thread (void) {
     cc_int32 err;
     cc_context_t context = NULL;
     
index 7059f98cc721ed5c50f4bacee067985f7bc5a8f1..265804e677e2baee67433d71438459cbefaa1d17 100644 (file)
@@ -11,7 +11,7 @@
 // ---------------------------------------------------------------------------
 
 
-int check_cc_ccache_release() {
+int check_cc_ccache_release(void) {
        cc_int32 err = 0;
        cc_context_t context = NULL;
        cc_ccache_t ccache = NULL;
index 28a4fbabc635cb355f6e678a71d3a26f2d0931f4..ecb06219788ee31bb1c8986b09824b97d8ff98a3 100644 (file)
@@ -3,47 +3,47 @@
 
 #include "test_ccapi_globals.h"
 
-int check_cc_ccache_release();
+int check_cc_ccache_release(void);
 cc_int32 check_once_cc_ccache_release(cc_context_t context, cc_ccache_t ccache, cc_int32 expected_err, const char *description);
-int check_cc_ccache_destroy();
+int check_cc_ccache_destroy(void);
 cc_int32 check_once_cc_ccache_destroy(cc_context_t context, cc_ccache_t ccache, cc_int32 expected_err, const char *description);
-int check_cc_ccache_set_default();
+int check_cc_ccache_set_default(void);
 cc_int32 check_once_cc_ccache_set_default(cc_context_t context, cc_ccache_t ccache, cc_int32 expected_err, const char *description);
-int check_cc_ccache_get_credentials_version();
+int check_cc_ccache_get_credentials_version(void);
 cc_int32 check_once_cc_ccache_get_credentials_version(cc_ccache_t ccache, cc_uint32 expected_cred_vers, cc_int32 expected_err, const char *description);
-int check_cc_ccache_get_name();
+int check_cc_ccache_get_name(void);
 cc_int32 check_once_cc_ccache_get_name(cc_ccache_t ccache, const char *expected_name, cc_int32 expected_err, const char *description);
-int check_cc_ccache_get_principal();
-cc_int32 check_once_ccache_get_principal(cc_ccache_t ccache, cc_uint32 cred_vers, const char *expected_principal, cc_int32 expected_err, const char *description);
-int check_cc_ccache_set_principal();
+int check_cc_ccache_get_principal(void);
+cc_int32 check_once_cc_ccache_get_principal(cc_ccache_t ccache, cc_uint32 cred_vers, const char *expected_principal, cc_int32 expected_err, const char *description);
+int check_cc_ccache_set_principal(void);
 cc_int32 check_once_cc_ccache_set_principal(cc_ccache_t ccache, cc_uint32 cred_vers, const char *in_principal, cc_int32 expected_err, const char *description);
 
-int check_cc_ccache_store_credentials();
+int check_cc_ccache_store_credentials(void);
 cc_int32 check_once_cc_ccache_store_credentials(cc_ccache_t ccache, const cc_credentials_union *credentials, cc_int32 expected_err, const char *description);
-int check_cc_ccache_remove_credentials();
+int check_cc_ccache_remove_credentials(void);
 cc_int32 check_once_cc_ccache_remove_credentials(cc_ccache_t ccache, cc_credentials_t in_creds, cc_int32 expected_err, const char *description);
 
-int check_cc_ccache_new_credentials_iterator();
+int check_cc_ccache_new_credentials_iterator(void);
 cc_int32 check_once_cc_ccache_new_credentials_iterator(cc_ccache_t ccache, cc_credentials_iterator_t *iterator, cc_int32 expected_err, const char *description);
 
-int check_cc_ccache_get_change_time();
+int check_cc_ccache_get_change_time(void);
 cc_int32 check_once_cc_ccache_get_change_time(cc_ccache_t ccache, cc_time_t *last_time, cc_int32 expected_err, const char *description);
-int check_cc_ccache_get_last_default_time();
-cc_int32 check_once_ccache_get_last_default_time(cc_ccache_t ccache, cc_time_t *last_time, cc_int32 expected_err, const char *description);
+int check_cc_ccache_get_last_default_time(void);
+cc_int32 check_once_cc_ccache_get_last_default_time(cc_ccache_t ccache, cc_time_t *last_time, cc_int32 expected_err, const char *description);
 
-int check_cc_ccache_move();
+int check_cc_ccache_move(void);
 cc_int32 check_once_cc_ccache_move(cc_ccache_t source, cc_ccache_t destination, cc_int32 expected_err, const char *description);
 
-int check_cc_ccache_compare();
+int check_cc_ccache_compare(void);
 cc_int32 check_once_cc_ccache_compare(cc_ccache_t ccache, cc_ccache_t compare_to, cc_uint32 *equal, cc_int32 expected_err, const char *description);
 
-int check_cc_ccache_get_kdc_time_offset();
+int check_cc_ccache_get_kdc_time_offset(void);
 cc_int32 check_once_cc_ccache_get_kdc_time_offset(cc_ccache_t ccache, cc_int32 credentials_version, cc_time_t *time_offset, cc_int32 expected_err, const char *description);
 
-int check_cc_ccache_set_kdc_time_offset();
+int check_cc_ccache_set_kdc_time_offset(void);
 cc_int32 check_once_cc_ccache_set_kdc_time_offset(cc_ccache_t ccache, cc_int32 credentials_version, cc_time_t time_offset, cc_int32 expected_err, const char *description);
 
-int check_cc_ccache_clear_kdc_time_offset();
+int check_cc_ccache_clear_kdc_time_offset(void);
 cc_int32 check_once_cc_ccache_clear_kdc_time_offset(cc_ccache_t ccache, cc_int32 credentials_version, cc_int32 expected_err, const char *description);
 
 #endif /* _TEST_CCAPI_CCACHE_H_ */
index 12192a6572fb8bde85c30264b728003bb80efa97..8352adfdc62406c5e6ceb2c97d47b73f28176b3f 100644 (file)
@@ -34,4 +34,4 @@ int array_contains_int(cc_int32 *array, int size, cc_int32 value) {
                }
        }
        return 0;
-}
\ No newline at end of file
+}
index 5203fff1116d70685e7af91b100c7f8d1ab09e93..10d07f061e27fbb2d74d0dc38e2fa22146bc4edb 100644 (file)
@@ -2,7 +2,7 @@
 #include "test_ccapi_globals.h"
 #include "test_ccapi_check.h"
 
-int check_constants() {
+int check_constants(void) {
        BEGIN_TEST("constants");
        /* API versions */
        
@@ -63,4 +63,4 @@ int check_constants() {
        check_int(cc_lock_block,   1);
        
        END_TEST_AND_RETURN
-}
\ No newline at end of file
+}
index ff6fd66a157cb6894441036e22a83209753cf9e8..bc3f4f3b715993047efaec4d26939ee6ec228a43 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef _TEST_CCAPI_CONSTANTS_H_
 #define _TEST_CCAPI_CONSTANTS_H_
 
-int check_constants();
+int check_constants(void);
 
 #endif /* _TEST_CCAPI_CONSTANTS_H_ */
index 42a4f97c446e977a7a9fe2803190ece70661bbe2..74f4fcab014cd8e75d3a542a3d1e09a750de2079 100644 (file)
@@ -245,4 +245,4 @@ cc_int32 check_once_cc_credentials_iterator_next(cc_credentials_iterator_t itera
        END_CHECK_ONCE;
 
        return err;     
-}
\ No newline at end of file
+}
index d36affa5abf434c350cfa4df812b5454bfa2d8fc..7308c7c49d279ee1bd36ba8b2d1fef883370102d 100644 (file)
@@ -3,10 +3,10 @@
 
 #include "test_ccapi_globals.h"
 
-int check_cc_ccache_iterator_next();
+int check_cc_ccache_iterator_next(void);
 cc_int32 check_once_cc_ccache_iterator_next(cc_ccache_iterator_t iterator, cc_uint32 expected_count, cc_int32 expected_err, const char *description);
 
-int check_cc_credentials_iterator_next();
+int check_cc_credentials_iterator_next(void);
 cc_int32 check_once_cc_credentials_iterator_next(cc_credentials_iterator_t iterator, cc_uint32 expected_count, cc_int32 expected_err, const char *description);
 
 #endif /* _TEST_CCAPI_ITERATORS_H_ */
index 95a467ad6f4e7239458f20f4184d9a6e8db28033..348d55cdc07b3927024b8441ac13c6272c1db2f0 100644 (file)
@@ -7,7 +7,7 @@ void _log_error_v(const char *file, int line, const char *format, va_list ap)
 {
        fprintf(stdout, "\n\t%s:%d: ", file, line);
        if (!format) {
-               fprintf(stdout, "An unknown error occurred", file, line);
+               fprintf(stdout, "An unknown error occurred");
        } else {
                vfprintf(stdout, format, ap);
        }
index 282ec74b56540e1e5c111646deaae7872ce6feaa..e2ad2b7d86803a3e243fbbc907eb0a1362e58614 100644 (file)
@@ -38,7 +38,7 @@ cc_int32 new_v5_creds_union (cc_credentials_union *out_union, const char *realm)
     cc_int32 err = ccNoError;
     cc_credentials_union *cred_union = NULL;
        cc_credentials_v5_t *v5creds = NULL;
-    static num_runs = 1;
+    static int num_runs = 1;
        char *client = NULL;
        char *server = NULL;
        
@@ -138,4 +138,4 @@ int compare_v5_creds_unions(const cc_credentials_union *a, const cc_credentials_
        }
        
        return retval;
-}
\ No newline at end of file
+}