From c2be1ee1d726463590ae1272495d102111fdf75b Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Fri, 20 Aug 2010 16:37:56 -0400 Subject: [PATCH] Fixes for signed char architectures "char" is unsigned on s390x, which causes a few warnings where we test for negative values. Add a signed modifier in a few cases, and in vos.c replace with an int to match a similar section of code in the same file. Mostly a warning fix, but in one case the variable could be used to return a -1 error value, so it may have caused an actual bug. Change-Id: I005fbcd7c573735df7403316ec0ced67ee81e559 Reviewed-on: http://gerrit.openafs.org/2602 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/afs/afs.h | 2 +- src/rxkad/rxkad.p.h | 2 +- src/volser/vos.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/afs/afs.h b/src/afs/afs.h index 2f39f2b0f6..a54a3173ca 100644 --- a/src/afs/afs.h +++ b/src/afs/afs.h @@ -104,7 +104,7 @@ extern afs_int32 afs_rx_idledead; struct sysname_info { char *name; short offset; - char index, allocked; + signed char index, allocked; }; /* flags to use with AFSOP_CACHEINIT */ diff --git a/src/rxkad/rxkad.p.h b/src/rxkad/rxkad.p.h index 6895b5a2e7..91d1f52087 100644 --- a/src/rxkad/rxkad.p.h +++ b/src/rxkad/rxkad.p.h @@ -74,7 +74,7 @@ typedef char rxkad_type; #define rxkad_client 1 /* bits definitions */ #define rxkad_server 2 -typedef char rxkad_level; +typedef signed char rxkad_level; #define rxkad_clear 0 /* send packets in the clear */ #define rxkad_auth 1 /* send encrypted sequence numbers */ #define rxkad_crypt 2 /* encrypt packet data */ diff --git a/src/volser/vos.c b/src/volser/vos.c index fbd66c05ba..391ff34fcf 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -5568,7 +5568,7 @@ ConvertRO(struct cmd_syndesc *as, void *arock) afs_int32 ropartition = 0; int force = 0; struct rx_connection *aconn; - char c, dc; + int c, dc; server = GetServer(as->parms[0].items->data); if (!server) {