Skip to content

Commit

Permalink
build(gcc): fix char-subscripts warnings
Browse files Browse the repository at this point in the history
close #250
  • Loading branch information
hyoklee committed Aug 30, 2024
1 parent 2fe1c68 commit c967677
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/H5private.h
Original file line number Diff line number Diff line change
Expand Up @@ -1133,30 +1133,30 @@ H5_DLL herr_t H5_trace_args(struct H5RS_str_t *rs, const char *type, va_list ap)
&& '_' != ((const char *)S)[3] /* underscore at position 3 */ \
&& !( /* NOT */ \
((const char *)S)[4] /* pos 4 exists */ \
&& (isupper(S[3]) || isdigit(S[3])) /* pos 3 dig | uc */ \
&& (isupper((int)S[3]) || isdigit((int)S[3])) /* pos 3 dig | uc */ \
&& '_' == ((const char *)S)[4] /* pos 4 underscore */ \
))

/* `S' is the name of a function which is being tested to check if it's */
/* a public API function */
#define H5_IS_PUB(S) \
(((isdigit(S[1]) || isupper(S[1])) && islower(S[2])) || \
((isdigit(S[2]) || isupper(S[2])) && islower(S[3])) || \
(!S[4] || ((isdigit(S[3]) || isupper(S[3])) && islower(S[4]))))
(((isdigit((int)S[1]) || isupper((int)S[1])) && islower((int)S[2])) || \
((isdigit((int)S[2]) || isupper((int)S[2])) && islower((int)S[3])) || \
(!S[4] || ((isdigit((int)S[3]) || isupper((int)S[3])) && islower((int)S[4]))))

/* `S' is the name of a function which is being tested to check if it's */
/* a private library function */
#define H5_IS_PRIV(S) \
(((isdigit(S[1]) || isupper(S[1])) && '_' == S[2] && islower(S[3])) || \
((isdigit(S[2]) || isupper(S[2])) && '_' == S[3] && islower(S[4])) || \
((isdigit(S[3]) || isupper(S[3])) && '_' == S[4] && islower(S[5])))
(((isdigit((int)S[1]) || isupper((int)S[1])) && '_' == S[2] && islower((int)S[3])) || \
((isdigit((int)S[2]) || isupper((int)S[2])) && '_' == S[3] && islower((int)S[4])) || \
((isdigit((int)S[3]) || isupper((int)S[3])) && '_' == S[4] && islower((int)S[5])))

/* `S' is the name of a function which is being tested to check if it's */
/* a package private function */
#define H5_IS_PKG(S) \
(((isdigit(S[1]) || isupper(S[1])) && '_' == S[2] && '_' == S[3] && islower(S[4])) || \
((isdigit(S[2]) || isupper(S[2])) && '_' == S[3] && '_' == S[4] && islower(S[5])) || \
((isdigit(S[3]) || isupper(S[3])) && '_' == S[4] && '_' == S[5] && islower(S[6])))
(((isdigit((int)S[1]) || isupper((int)S[1])) && '_' == S[2] && '_' == S[3] && islower((int)S[4])) || \
((isdigit((int)S[2]) || isupper((int)S[2])) && '_' == S[3] && '_' == S[4] && islower((int)S[5])) || \
((isdigit((int)S[3]) || isupper((int)S[3])) && '_' == S[4] && '_' == S[5] && islower((int)S[6])))

/* global library version information string */
extern char H5_lib_vers_info_g[];
Expand Down

0 comments on commit c967677

Please sign in to comment.