mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[svn-r1667] same fixes from the release branch were done here.
just casts with the parameters for the isdigit and isprint functions
This commit is contained in:
parent
b4dbf55fbe
commit
eaaa292603
@ -105,7 +105,7 @@ get_size (const char *progname, int *argno, int argc, char *argv[])
|
||||
off_t retval=-1;
|
||||
char *suffix;
|
||||
|
||||
if (isdigit (argv[*argno][2])) {
|
||||
if (isdigit ((int)(argv[*argno][2]))) {
|
||||
retval = strtol (argv[*argno]+2, &suffix, 10);
|
||||
(*argno)++;
|
||||
} else if (argv[*argno][2] || *argno+1>=argc) {
|
||||
|
@ -435,7 +435,7 @@ h5dump_escape(char *s/*in,out*/, size_t size, int escape_spaces)
|
||||
escape = escape_spaces ? "\\ " : NULL;
|
||||
break;
|
||||
default:
|
||||
if (!isprint(*s)) {
|
||||
if (!isprint((int)*s)) {
|
||||
sprintf(octal, "\\%03o", (unsigned char)(s[i]));
|
||||
escape = octal;
|
||||
} else {
|
||||
@ -668,7 +668,7 @@ h5dump_sprint(h5dump_str_t *str/*in,out*/, const h5dump_t *info,
|
||||
h5dump_str_append(str, "\\t");
|
||||
break;
|
||||
default:
|
||||
if (isprint(*((char*)vp))) {
|
||||
if (isprint((int)(*((char*)vp)))) {
|
||||
h5dump_str_append(str, "%c", *((char*)vp));
|
||||
} else {
|
||||
h5dump_str_append(str, "\\%03o", *((unsigned char*)vp));
|
||||
@ -736,7 +736,7 @@ h5dump_sprint(h5dump_str_t *str/*in,out*/, const h5dump_t *info,
|
||||
h5dump_str_append(str, "\\t");
|
||||
break;
|
||||
default:
|
||||
if (isprint(((char*)vp)[i])) {
|
||||
if (isprint((int)((char*)vp)[i])) {
|
||||
h5dump_str_append(str, "%c", ((char*)vp)[i]);
|
||||
} else {
|
||||
h5dump_str_append(str, "\\%03o", ((unsigned char*)vp)[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user