diff options
author | Ezra Peisach <epeisach@mit.edu> | 2001-12-05 11:39:39 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 2001-12-05 11:39:39 +0000 |
commit | bbdbf4b0365f03c9a7a77fe21b06e3a0107aa3e6 (patch) | |
tree | 9a15390d57c52ee62a7fec8d6acd6254d1937029 /src | |
parent | 76b60d050bd71dcabb793aad27b172c579a55993 (diff) | |
download | krb5-bbdbf4b0365f03c9a7a77fe21b06e3a0107aa3e6.tar.gz krb5-bbdbf4b0365f03c9a7a77fe21b06e3a0107aa3e6.tar.xz krb5-bbdbf4b0365f03c9a7a77fe21b06e3a0107aa3e6.zip |
* gss-client.c, gss-misc.c, gss-server.c: Cast buffer length to
int in length argument for printf.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14038 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/appl/gss-sample/ChangeLog | 5 | ||||
-rw-r--r-- | src/appl/gss-sample/gss-client.c | 11 | ||||
-rw-r--r-- | src/appl/gss-sample/gss-misc.c | 4 | ||||
-rw-r--r-- | src/appl/gss-sample/gss-server.c | 7 |
4 files changed, 17 insertions, 10 deletions
diff --git a/src/appl/gss-sample/ChangeLog b/src/appl/gss-sample/ChangeLog index 35f109349c..af926898b1 100644 --- a/src/appl/gss-sample/ChangeLog +++ b/src/appl/gss-sample/ChangeLog @@ -1,3 +1,8 @@ +2001-12-05 Ezra Peisach <epeisach@mit.edu> + + * gss-client.c, gss-misc.c, gss-server.c: Cast buffer length to + int in length argument for printf. + 2001-11-19 Ezra Peisach <epeisach@mit.edu> * gss-server.c (server_establish_context, sign_server): Ensure diff --git a/src/appl/gss-sample/gss-client.c b/src/appl/gss-sample/gss-client.c index 64698aa0e3..d4b0653100 100644 --- a/src/appl/gss-sample/gss-client.c +++ b/src/appl/gss-sample/gss-client.c @@ -204,7 +204,7 @@ static int client_establish_context(s, service_name, deleg_flag, auth_flag, if (send_tok.length != 0) { if (verbose) printf("Sending init_sec_context token (size=%d)...", - send_tok.length); + (int) send_tok.length); if (send_token(s, TOKEN_CONTEXT, &send_tok) < 0) { (void) gss_release_buffer(&min_stat, &send_tok); (void) gss_release_name(&min_stat, &target_name); @@ -271,7 +271,7 @@ static void read_file(file_name, in_buf) if ((in_buf->value = malloc(in_buf->length)) == 0) { fprintf(stderr, "Couldn't allocate %d byte buffer for reading file\n", - in_buf->length); + (int) in_buf->length); exit(1); } @@ -285,7 +285,7 @@ static void read_file(file_name, in_buf) } if (count < in_buf->length) fprintf(stderr, "Warning, only read in %d bytes, expected %d\n", - count, in_buf->length); + count, (int) in_buf->length); } /* @@ -428,7 +428,7 @@ static int call_server(host, port, oid, service_name, deleg_flag, auth_flag, } printf("Mechanism %.*s supports %d names\n", (int) oid_name.length, (char *) oid_name.value, - mech_names->count); + (int) mech_names->count); (void) gss_release_buffer(&min_stat, &oid_name); for (i=0; i<mech_names->count; i++) { @@ -439,7 +439,7 @@ static int call_server(host, port, oid, service_name, deleg_flag, auth_flag, display_status("converting oid->string", maj_stat, min_stat); return -1; } - printf(" %d: %.*s\n", i, + printf(" %d: %.*s\n", (int) i, (int) oid_name.length, (char *) oid_name.value); (void) gss_release_buffer(&min_stat, &oid_name); @@ -637,6 +637,7 @@ int main(argc, argv) deleg_flag, auth_flag, wrap_flag, encrypt_flag, mic_flag, msg, use_file, mcount) < 0) exit(1); +} } if (oid != GSS_C_NULL_OID) diff --git a/src/appl/gss-sample/gss-misc.c b/src/appl/gss-sample/gss-misc.c index 0fc6d9295d..a9417c2e79 100644 --- a/src/appl/gss-sample/gss-misc.c +++ b/src/appl/gss-sample/gss-misc.c @@ -151,7 +151,7 @@ int send_token(s, flags, tok) if (display_file) fprintf(display_file, "sending token data: %d of %d bytes written\n", - ret, tok->length); + ret, (int) tok->length); return -1; } @@ -229,7 +229,7 @@ int recv_token(s, flags, tok) return -1; } else if (ret != tok->length) { fprintf(stderr, "sending token data: %d of %d bytes written\n", - ret, tok->length); + ret, (int) tok->length); free(tok->value); return -1; } diff --git a/src/appl/gss-sample/gss-server.c b/src/appl/gss-sample/gss-server.c index 8a394a5fa1..d8c1c84be5 100644 --- a/src/appl/gss-sample/gss-server.c +++ b/src/appl/gss-sample/gss-server.c @@ -166,7 +166,7 @@ static int server_establish_context(s, server_creds, context, client_name, return -1; if (verbose && log) { - fprintf(log, "Received token (size=%d): \n", recv_tok.length); + fprintf(log, "Received token (size=%d): \n", (int) recv_tok.length); print_token(&recv_tok); } @@ -192,7 +192,7 @@ static int server_establish_context(s, server_creds, context, client_name, if (verbose && log) { fprintf(log, "Sending accept_sec_context token (size=%d):\n", - send_tok.length); + (int) send_tok.length); print_token(&send_tok); } if (send_token(s, TOKEN_CONTEXT, &send_tok) < 0) { @@ -333,7 +333,8 @@ static int test_import_export_context(context) gettimeofday(&tm2, (struct timezone *)0); if (verbose && log) fprintf(log, "Exported context: %d bytes, %7.4f seconds\n", - context_token.length, timeval_subtract(&tm2, &tm1)); + (int) context_token.length, + timeval_subtract(&tm2, &tm1)); copied_token.length = context_token.length; copied_token.value = malloc(context_token.length); if (copied_token.value == 0) { |