mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-19 16:50:46 +08:00
Misc clang warning fixes (#1869)
* Minor clang warning fixes in src and test * Fixes clang warnings in high-level library * clang format-nonliteral warning fixes * Committing clang-format changes * Fixed int -> float clang cast warnings in h5diff * Quiets some warnings in flex/bison generated code * Suppress overlong string warning for libinfo on clang Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
0412d3f292
commit
e269f90364
@ -236,6 +236,7 @@ do
|
||||
echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wstrict-overflow" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" ' >> tmp.out
|
||||
echo '#if !defined (__clang__) ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=const" ' >> tmp.out
|
||||
|
@ -10,6 +10,7 @@
|
||||
#pragma GCC diagnostic ignored "-Wsign-conversion"
|
||||
#pragma GCC diagnostic ignored "-Wstrict-overflow"
|
||||
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#if !defined (__clang__)
|
||||
#pragma GCC diagnostic ignored "-Wlarger-than="
|
||||
#pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
|
||||
@ -28,14 +29,14 @@
|
||||
#elif defined _MSC_VER
|
||||
#pragma warning(push, 1)
|
||||
#endif
|
||||
#line 2 "./hl/src/H5LTanalyze.c"
|
||||
#line 2 "hl/src//H5LTanalyze.c"
|
||||
/* Quiet warnings about integer type macro redifinitions on Visual Studio
|
||||
* (MSVC doesn't define STDC_VERSION, but has inttypes.h). This is an
|
||||
* issue that is apparently fixed in flex 2.6.5.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
|
||||
#line 9 "./hl/src/H5LTanalyze.c"
|
||||
#line 9 "hl/src//H5LTanalyze.c"
|
||||
|
||||
#define YY_INT_ALIGNED short int
|
||||
|
||||
@ -893,7 +894,7 @@ int yy_flex_debug = 0;
|
||||
#define YY_MORE_ADJ 0
|
||||
#define YY_RESTORE_YY_MORE_OFFSET
|
||||
char *yytext;
|
||||
#line 1 "./hl/src/H5LTanalyze.l"
|
||||
#line 1 "hl/src//H5LTanalyze.l"
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
@ -912,7 +913,7 @@ char *yytext;
|
||||
* recreate the output files.
|
||||
*/
|
||||
|
||||
#line 29 "./hl/src/H5LTanalyze.l"
|
||||
#line 29 "hl/src//H5LTanalyze.l"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -936,8 +937,8 @@ static int my_yyinput(char *, int);
|
||||
extern char *myinput;
|
||||
extern size_t input_len;
|
||||
|
||||
#line 910 "./hl/src/H5LTanalyze.c"
|
||||
#line 911 "./hl/src/H5LTanalyze.c"
|
||||
#line 910 "hl/src//H5LTanalyze.c"
|
||||
#line 911 "hl/src//H5LTanalyze.c"
|
||||
|
||||
#define INITIAL 0
|
||||
|
||||
@ -1146,10 +1147,10 @@ YY_DECL
|
||||
}
|
||||
|
||||
{
|
||||
#line 54 "./hl/src/H5LTanalyze.l"
|
||||
#line 54 "hl/src//H5LTanalyze.l"
|
||||
|
||||
|
||||
#line 1123 "./hl/src/H5LTanalyze.c"
|
||||
#line 1123 "hl/src//H5LTanalyze.c"
|
||||
|
||||
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
|
||||
{
|
||||
@ -1208,277 +1209,277 @@ do_action: /* This label is used only to access EOF actions. */
|
||||
|
||||
case 1:
|
||||
YY_RULE_SETUP
|
||||
#line 56 "./hl/src/H5LTanalyze.l"
|
||||
#line 56 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_I8BE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 2:
|
||||
YY_RULE_SETUP
|
||||
#line 57 "./hl/src/H5LTanalyze.l"
|
||||
#line 57 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_I8LE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 3:
|
||||
YY_RULE_SETUP
|
||||
#line 58 "./hl/src/H5LTanalyze.l"
|
||||
#line 58 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_I16BE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 4:
|
||||
YY_RULE_SETUP
|
||||
#line 59 "./hl/src/H5LTanalyze.l"
|
||||
#line 59 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_I16LE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 5:
|
||||
YY_RULE_SETUP
|
||||
#line 60 "./hl/src/H5LTanalyze.l"
|
||||
#line 60 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_I32BE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 6:
|
||||
YY_RULE_SETUP
|
||||
#line 61 "./hl/src/H5LTanalyze.l"
|
||||
#line 61 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_I32LE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 7:
|
||||
YY_RULE_SETUP
|
||||
#line 62 "./hl/src/H5LTanalyze.l"
|
||||
#line 62 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_I64BE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 8:
|
||||
YY_RULE_SETUP
|
||||
#line 63 "./hl/src/H5LTanalyze.l"
|
||||
#line 63 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_I64LE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 9:
|
||||
YY_RULE_SETUP
|
||||
#line 65 "./hl/src/H5LTanalyze.l"
|
||||
#line 65 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_U8BE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 10:
|
||||
YY_RULE_SETUP
|
||||
#line 66 "./hl/src/H5LTanalyze.l"
|
||||
#line 66 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_U8LE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 11:
|
||||
YY_RULE_SETUP
|
||||
#line 67 "./hl/src/H5LTanalyze.l"
|
||||
#line 67 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_U16BE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 12:
|
||||
YY_RULE_SETUP
|
||||
#line 68 "./hl/src/H5LTanalyze.l"
|
||||
#line 68 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_U16LE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 13:
|
||||
YY_RULE_SETUP
|
||||
#line 69 "./hl/src/H5LTanalyze.l"
|
||||
#line 69 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_U32BE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 14:
|
||||
YY_RULE_SETUP
|
||||
#line 70 "./hl/src/H5LTanalyze.l"
|
||||
#line 70 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_U32LE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 15:
|
||||
YY_RULE_SETUP
|
||||
#line 71 "./hl/src/H5LTanalyze.l"
|
||||
#line 71 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_U64BE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 16:
|
||||
YY_RULE_SETUP
|
||||
#line 72 "./hl/src/H5LTanalyze.l"
|
||||
#line 72 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_STD_U64LE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 17:
|
||||
YY_RULE_SETUP
|
||||
#line 74 "./hl/src/H5LTanalyze.l"
|
||||
#line 74 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_CHAR_TOKEN);}
|
||||
YY_BREAK
|
||||
case 18:
|
||||
YY_RULE_SETUP
|
||||
#line 75 "./hl/src/H5LTanalyze.l"
|
||||
#line 75 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_SCHAR_TOKEN);}
|
||||
YY_BREAK
|
||||
case 19:
|
||||
YY_RULE_SETUP
|
||||
#line 76 "./hl/src/H5LTanalyze.l"
|
||||
#line 76 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_UCHAR_TOKEN);}
|
||||
YY_BREAK
|
||||
case 20:
|
||||
YY_RULE_SETUP
|
||||
#line 77 "./hl/src/H5LTanalyze.l"
|
||||
#line 77 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_SHORT_TOKEN);}
|
||||
YY_BREAK
|
||||
case 21:
|
||||
YY_RULE_SETUP
|
||||
#line 78 "./hl/src/H5LTanalyze.l"
|
||||
#line 78 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_USHORT_TOKEN);}
|
||||
YY_BREAK
|
||||
case 22:
|
||||
YY_RULE_SETUP
|
||||
#line 79 "./hl/src/H5LTanalyze.l"
|
||||
#line 79 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_INT_TOKEN);}
|
||||
YY_BREAK
|
||||
case 23:
|
||||
YY_RULE_SETUP
|
||||
#line 80 "./hl/src/H5LTanalyze.l"
|
||||
#line 80 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_UINT_TOKEN);}
|
||||
YY_BREAK
|
||||
case 24:
|
||||
YY_RULE_SETUP
|
||||
#line 81 "./hl/src/H5LTanalyze.l"
|
||||
#line 81 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_LONG_TOKEN);}
|
||||
YY_BREAK
|
||||
case 25:
|
||||
YY_RULE_SETUP
|
||||
#line 82 "./hl/src/H5LTanalyze.l"
|
||||
#line 82 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_ULONG_TOKEN);}
|
||||
YY_BREAK
|
||||
case 26:
|
||||
YY_RULE_SETUP
|
||||
#line 83 "./hl/src/H5LTanalyze.l"
|
||||
#line 83 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_LLONG_TOKEN);}
|
||||
YY_BREAK
|
||||
case 27:
|
||||
YY_RULE_SETUP
|
||||
#line 84 "./hl/src/H5LTanalyze.l"
|
||||
#line 84 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_ULLONG_TOKEN);}
|
||||
YY_BREAK
|
||||
case 28:
|
||||
YY_RULE_SETUP
|
||||
#line 86 "./hl/src/H5LTanalyze.l"
|
||||
#line 86 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_IEEE_F32BE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 29:
|
||||
YY_RULE_SETUP
|
||||
#line 87 "./hl/src/H5LTanalyze.l"
|
||||
#line 87 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_IEEE_F32LE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 30:
|
||||
YY_RULE_SETUP
|
||||
#line 88 "./hl/src/H5LTanalyze.l"
|
||||
#line 88 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_IEEE_F64BE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 31:
|
||||
YY_RULE_SETUP
|
||||
#line 89 "./hl/src/H5LTanalyze.l"
|
||||
#line 89 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_IEEE_F64LE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 32:
|
||||
YY_RULE_SETUP
|
||||
#line 90 "./hl/src/H5LTanalyze.l"
|
||||
#line 90 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_FLOAT_TOKEN);}
|
||||
YY_BREAK
|
||||
case 33:
|
||||
YY_RULE_SETUP
|
||||
#line 91 "./hl/src/H5LTanalyze.l"
|
||||
#line 91 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_DOUBLE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 34:
|
||||
YY_RULE_SETUP
|
||||
#line 92 "./hl/src/H5LTanalyze.l"
|
||||
#line 92 "hl/src//H5LTanalyze.l"
|
||||
{return hid(H5T_NATIVE_LDOUBLE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 35:
|
||||
YY_RULE_SETUP
|
||||
#line 94 "./hl/src/H5LTanalyze.l"
|
||||
#line 94 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_STRING_TOKEN);}
|
||||
YY_BREAK
|
||||
case 36:
|
||||
YY_RULE_SETUP
|
||||
#line 95 "./hl/src/H5LTanalyze.l"
|
||||
#line 95 "hl/src//H5LTanalyze.l"
|
||||
{return token(STRSIZE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 37:
|
||||
YY_RULE_SETUP
|
||||
#line 96 "./hl/src/H5LTanalyze.l"
|
||||
#line 96 "hl/src//H5LTanalyze.l"
|
||||
{return token(STRPAD_TOKEN);}
|
||||
YY_BREAK
|
||||
case 38:
|
||||
YY_RULE_SETUP
|
||||
#line 97 "./hl/src/H5LTanalyze.l"
|
||||
#line 97 "hl/src//H5LTanalyze.l"
|
||||
{return token(CSET_TOKEN);}
|
||||
YY_BREAK
|
||||
case 39:
|
||||
YY_RULE_SETUP
|
||||
#line 98 "./hl/src/H5LTanalyze.l"
|
||||
#line 98 "hl/src//H5LTanalyze.l"
|
||||
{return token(CTYPE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 40:
|
||||
YY_RULE_SETUP
|
||||
#line 99 "./hl/src/H5LTanalyze.l"
|
||||
#line 99 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_STR_NULLTERM_TOKEN);}
|
||||
YY_BREAK
|
||||
case 41:
|
||||
YY_RULE_SETUP
|
||||
#line 100 "./hl/src/H5LTanalyze.l"
|
||||
#line 100 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_STR_NULLPAD_TOKEN);}
|
||||
YY_BREAK
|
||||
case 42:
|
||||
YY_RULE_SETUP
|
||||
#line 101 "./hl/src/H5LTanalyze.l"
|
||||
#line 101 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_STR_SPACEPAD_TOKEN);}
|
||||
YY_BREAK
|
||||
case 43:
|
||||
YY_RULE_SETUP
|
||||
#line 102 "./hl/src/H5LTanalyze.l"
|
||||
#line 102 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_CSET_ASCII_TOKEN);}
|
||||
YY_BREAK
|
||||
case 44:
|
||||
YY_RULE_SETUP
|
||||
#line 103 "./hl/src/H5LTanalyze.l"
|
||||
#line 103 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_CSET_UTF8_TOKEN);}
|
||||
YY_BREAK
|
||||
case 45:
|
||||
YY_RULE_SETUP
|
||||
#line 104 "./hl/src/H5LTanalyze.l"
|
||||
#line 104 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_C_S1_TOKEN);}
|
||||
YY_BREAK
|
||||
case 46:
|
||||
YY_RULE_SETUP
|
||||
#line 105 "./hl/src/H5LTanalyze.l"
|
||||
#line 105 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_FORTRAN_S1_TOKEN);}
|
||||
YY_BREAK
|
||||
case 47:
|
||||
YY_RULE_SETUP
|
||||
#line 106 "./hl/src/H5LTanalyze.l"
|
||||
#line 106 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_VARIABLE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 48:
|
||||
YY_RULE_SETUP
|
||||
#line 108 "./hl/src/H5LTanalyze.l"
|
||||
#line 108 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_COMPOUND_TOKEN);}
|
||||
YY_BREAK
|
||||
case 49:
|
||||
YY_RULE_SETUP
|
||||
#line 109 "./hl/src/H5LTanalyze.l"
|
||||
#line 109 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_ENUM_TOKEN);}
|
||||
YY_BREAK
|
||||
case 50:
|
||||
YY_RULE_SETUP
|
||||
#line 110 "./hl/src/H5LTanalyze.l"
|
||||
#line 110 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_ARRAY_TOKEN);}
|
||||
YY_BREAK
|
||||
case 51:
|
||||
YY_RULE_SETUP
|
||||
#line 111 "./hl/src/H5LTanalyze.l"
|
||||
#line 111 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_VLEN_TOKEN);}
|
||||
YY_BREAK
|
||||
case 52:
|
||||
YY_RULE_SETUP
|
||||
#line 113 "./hl/src/H5LTanalyze.l"
|
||||
#line 113 "hl/src//H5LTanalyze.l"
|
||||
{return token(H5T_OPAQUE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 53:
|
||||
YY_RULE_SETUP
|
||||
#line 114 "./hl/src/H5LTanalyze.l"
|
||||
#line 114 "hl/src//H5LTanalyze.l"
|
||||
{return token(OPQ_SIZE_TOKEN);}
|
||||
YY_BREAK
|
||||
case 54:
|
||||
YY_RULE_SETUP
|
||||
#line 115 "./hl/src/H5LTanalyze.l"
|
||||
#line 115 "hl/src//H5LTanalyze.l"
|
||||
{return token(OPQ_TAG_TOKEN);}
|
||||
YY_BREAK
|
||||
case 55:
|
||||
YY_RULE_SETUP
|
||||
#line 117 "./hl/src/H5LTanalyze.l"
|
||||
#line 117 "hl/src//H5LTanalyze.l"
|
||||
{
|
||||
H5LTyylval.ival = HDatoi(yytext);
|
||||
return NUMBER;
|
||||
@ -1487,7 +1488,7 @@ YY_RULE_SETUP
|
||||
case 56:
|
||||
/* rule 56 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 122 "./hl/src/H5LTanalyze.l"
|
||||
#line 122 "hl/src//H5LTanalyze.l"
|
||||
{
|
||||
H5LTyylval.sval = trim_quotes(yytext);
|
||||
return STRING;
|
||||
@ -1495,46 +1496,46 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 57:
|
||||
YY_RULE_SETUP
|
||||
#line 127 "./hl/src/H5LTanalyze.l"
|
||||
#line 127 "hl/src//H5LTanalyze.l"
|
||||
{return token('{');}
|
||||
YY_BREAK
|
||||
case 58:
|
||||
YY_RULE_SETUP
|
||||
#line 128 "./hl/src/H5LTanalyze.l"
|
||||
#line 128 "hl/src//H5LTanalyze.l"
|
||||
{return token('}');}
|
||||
YY_BREAK
|
||||
case 59:
|
||||
YY_RULE_SETUP
|
||||
#line 129 "./hl/src/H5LTanalyze.l"
|
||||
#line 129 "hl/src//H5LTanalyze.l"
|
||||
{return token('[');}
|
||||
YY_BREAK
|
||||
case 60:
|
||||
YY_RULE_SETUP
|
||||
#line 130 "./hl/src/H5LTanalyze.l"
|
||||
#line 130 "hl/src//H5LTanalyze.l"
|
||||
{return token(']');}
|
||||
YY_BREAK
|
||||
case 61:
|
||||
YY_RULE_SETUP
|
||||
#line 131 "./hl/src/H5LTanalyze.l"
|
||||
#line 131 "hl/src//H5LTanalyze.l"
|
||||
{return token(':');}
|
||||
YY_BREAK
|
||||
case 62:
|
||||
YY_RULE_SETUP
|
||||
#line 132 "./hl/src/H5LTanalyze.l"
|
||||
#line 132 "hl/src//H5LTanalyze.l"
|
||||
{return token(';');}
|
||||
YY_BREAK
|
||||
case 63:
|
||||
/* rule 63 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 133 "./hl/src/H5LTanalyze.l"
|
||||
#line 133 "hl/src//H5LTanalyze.l"
|
||||
;
|
||||
YY_BREAK
|
||||
case 64:
|
||||
YY_RULE_SETUP
|
||||
#line 135 "./hl/src/H5LTanalyze.l"
|
||||
#line 135 "hl/src//H5LTanalyze.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 1508 "./hl/src/H5LTanalyze.c"
|
||||
#line 1508 "hl/src//H5LTanalyze.c"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
yyterminate();
|
||||
|
||||
@ -2539,7 +2540,7 @@ void yyfree (void * ptr )
|
||||
|
||||
#define YYTABLES_NAME "yytables"
|
||||
|
||||
#line 135 "./hl/src/H5LTanalyze.l"
|
||||
#line 135 "hl/src//H5LTanalyze.l"
|
||||
|
||||
|
||||
/* Allocate a copy of `quoted` with the double quote character at
|
||||
|
1208
hl/src/H5LTparse.c
1208
hl/src/H5LTparse.c
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 3.5.1. */
|
||||
/* A Bison parser, made by GNU Bison 3.8.2. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -16,7 +16,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
@ -31,8 +31,9 @@
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
/* Undocumented macros, especially those whose name start with YY_,
|
||||
are private implementation details. Do not rely on them. */
|
||||
/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
|
||||
especially those whose name start with YY_ or yy_. They are
|
||||
private implementation details that can be changed or removed. */
|
||||
|
||||
#ifndef YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED
|
||||
# define YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED
|
||||
@ -44,81 +45,86 @@
|
||||
extern int H5LTyydebug;
|
||||
#endif
|
||||
|
||||
/* Token type. */
|
||||
/* Token kinds. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
enum yytokentype
|
||||
{
|
||||
H5T_STD_I8BE_TOKEN = 258,
|
||||
H5T_STD_I8LE_TOKEN = 259,
|
||||
H5T_STD_I16BE_TOKEN = 260,
|
||||
H5T_STD_I16LE_TOKEN = 261,
|
||||
H5T_STD_I32BE_TOKEN = 262,
|
||||
H5T_STD_I32LE_TOKEN = 263,
|
||||
H5T_STD_I64BE_TOKEN = 264,
|
||||
H5T_STD_I64LE_TOKEN = 265,
|
||||
H5T_STD_U8BE_TOKEN = 266,
|
||||
H5T_STD_U8LE_TOKEN = 267,
|
||||
H5T_STD_U16BE_TOKEN = 268,
|
||||
H5T_STD_U16LE_TOKEN = 269,
|
||||
H5T_STD_U32BE_TOKEN = 270,
|
||||
H5T_STD_U32LE_TOKEN = 271,
|
||||
H5T_STD_U64BE_TOKEN = 272,
|
||||
H5T_STD_U64LE_TOKEN = 273,
|
||||
H5T_NATIVE_CHAR_TOKEN = 274,
|
||||
H5T_NATIVE_SCHAR_TOKEN = 275,
|
||||
H5T_NATIVE_UCHAR_TOKEN = 276,
|
||||
H5T_NATIVE_SHORT_TOKEN = 277,
|
||||
H5T_NATIVE_USHORT_TOKEN = 278,
|
||||
H5T_NATIVE_INT_TOKEN = 279,
|
||||
H5T_NATIVE_UINT_TOKEN = 280,
|
||||
H5T_NATIVE_LONG_TOKEN = 281,
|
||||
H5T_NATIVE_ULONG_TOKEN = 282,
|
||||
H5T_NATIVE_LLONG_TOKEN = 283,
|
||||
H5T_NATIVE_ULLONG_TOKEN = 284,
|
||||
H5T_IEEE_F32BE_TOKEN = 285,
|
||||
H5T_IEEE_F32LE_TOKEN = 286,
|
||||
H5T_IEEE_F64BE_TOKEN = 287,
|
||||
H5T_IEEE_F64LE_TOKEN = 288,
|
||||
H5T_NATIVE_FLOAT_TOKEN = 289,
|
||||
H5T_NATIVE_DOUBLE_TOKEN = 290,
|
||||
H5T_NATIVE_LDOUBLE_TOKEN = 291,
|
||||
H5T_STRING_TOKEN = 292,
|
||||
STRSIZE_TOKEN = 293,
|
||||
STRPAD_TOKEN = 294,
|
||||
CSET_TOKEN = 295,
|
||||
CTYPE_TOKEN = 296,
|
||||
H5T_VARIABLE_TOKEN = 297,
|
||||
H5T_STR_NULLTERM_TOKEN = 298,
|
||||
H5T_STR_NULLPAD_TOKEN = 299,
|
||||
H5T_STR_SPACEPAD_TOKEN = 300,
|
||||
H5T_CSET_ASCII_TOKEN = 301,
|
||||
H5T_CSET_UTF8_TOKEN = 302,
|
||||
H5T_C_S1_TOKEN = 303,
|
||||
H5T_FORTRAN_S1_TOKEN = 304,
|
||||
H5T_OPAQUE_TOKEN = 305,
|
||||
OPQ_SIZE_TOKEN = 306,
|
||||
OPQ_TAG_TOKEN = 307,
|
||||
H5T_COMPOUND_TOKEN = 308,
|
||||
H5T_ENUM_TOKEN = 309,
|
||||
H5T_ARRAY_TOKEN = 310,
|
||||
H5T_VLEN_TOKEN = 311,
|
||||
STRING = 312,
|
||||
NUMBER = 313
|
||||
YYEMPTY = -2,
|
||||
YYEOF = 0, /* "end of file" */
|
||||
YYerror = 256, /* error */
|
||||
YYUNDEF = 257, /* "invalid token" */
|
||||
H5T_STD_I8BE_TOKEN = 258, /* H5T_STD_I8BE_TOKEN */
|
||||
H5T_STD_I8LE_TOKEN = 259, /* H5T_STD_I8LE_TOKEN */
|
||||
H5T_STD_I16BE_TOKEN = 260, /* H5T_STD_I16BE_TOKEN */
|
||||
H5T_STD_I16LE_TOKEN = 261, /* H5T_STD_I16LE_TOKEN */
|
||||
H5T_STD_I32BE_TOKEN = 262, /* H5T_STD_I32BE_TOKEN */
|
||||
H5T_STD_I32LE_TOKEN = 263, /* H5T_STD_I32LE_TOKEN */
|
||||
H5T_STD_I64BE_TOKEN = 264, /* H5T_STD_I64BE_TOKEN */
|
||||
H5T_STD_I64LE_TOKEN = 265, /* H5T_STD_I64LE_TOKEN */
|
||||
H5T_STD_U8BE_TOKEN = 266, /* H5T_STD_U8BE_TOKEN */
|
||||
H5T_STD_U8LE_TOKEN = 267, /* H5T_STD_U8LE_TOKEN */
|
||||
H5T_STD_U16BE_TOKEN = 268, /* H5T_STD_U16BE_TOKEN */
|
||||
H5T_STD_U16LE_TOKEN = 269, /* H5T_STD_U16LE_TOKEN */
|
||||
H5T_STD_U32BE_TOKEN = 270, /* H5T_STD_U32BE_TOKEN */
|
||||
H5T_STD_U32LE_TOKEN = 271, /* H5T_STD_U32LE_TOKEN */
|
||||
H5T_STD_U64BE_TOKEN = 272, /* H5T_STD_U64BE_TOKEN */
|
||||
H5T_STD_U64LE_TOKEN = 273, /* H5T_STD_U64LE_TOKEN */
|
||||
H5T_NATIVE_CHAR_TOKEN = 274, /* H5T_NATIVE_CHAR_TOKEN */
|
||||
H5T_NATIVE_SCHAR_TOKEN = 275, /* H5T_NATIVE_SCHAR_TOKEN */
|
||||
H5T_NATIVE_UCHAR_TOKEN = 276, /* H5T_NATIVE_UCHAR_TOKEN */
|
||||
H5T_NATIVE_SHORT_TOKEN = 277, /* H5T_NATIVE_SHORT_TOKEN */
|
||||
H5T_NATIVE_USHORT_TOKEN = 278, /* H5T_NATIVE_USHORT_TOKEN */
|
||||
H5T_NATIVE_INT_TOKEN = 279, /* H5T_NATIVE_INT_TOKEN */
|
||||
H5T_NATIVE_UINT_TOKEN = 280, /* H5T_NATIVE_UINT_TOKEN */
|
||||
H5T_NATIVE_LONG_TOKEN = 281, /* H5T_NATIVE_LONG_TOKEN */
|
||||
H5T_NATIVE_ULONG_TOKEN = 282, /* H5T_NATIVE_ULONG_TOKEN */
|
||||
H5T_NATIVE_LLONG_TOKEN = 283, /* H5T_NATIVE_LLONG_TOKEN */
|
||||
H5T_NATIVE_ULLONG_TOKEN = 284, /* H5T_NATIVE_ULLONG_TOKEN */
|
||||
H5T_IEEE_F32BE_TOKEN = 285, /* H5T_IEEE_F32BE_TOKEN */
|
||||
H5T_IEEE_F32LE_TOKEN = 286, /* H5T_IEEE_F32LE_TOKEN */
|
||||
H5T_IEEE_F64BE_TOKEN = 287, /* H5T_IEEE_F64BE_TOKEN */
|
||||
H5T_IEEE_F64LE_TOKEN = 288, /* H5T_IEEE_F64LE_TOKEN */
|
||||
H5T_NATIVE_FLOAT_TOKEN = 289, /* H5T_NATIVE_FLOAT_TOKEN */
|
||||
H5T_NATIVE_DOUBLE_TOKEN = 290, /* H5T_NATIVE_DOUBLE_TOKEN */
|
||||
H5T_NATIVE_LDOUBLE_TOKEN = 291, /* H5T_NATIVE_LDOUBLE_TOKEN */
|
||||
H5T_STRING_TOKEN = 292, /* H5T_STRING_TOKEN */
|
||||
STRSIZE_TOKEN = 293, /* STRSIZE_TOKEN */
|
||||
STRPAD_TOKEN = 294, /* STRPAD_TOKEN */
|
||||
CSET_TOKEN = 295, /* CSET_TOKEN */
|
||||
CTYPE_TOKEN = 296, /* CTYPE_TOKEN */
|
||||
H5T_VARIABLE_TOKEN = 297, /* H5T_VARIABLE_TOKEN */
|
||||
H5T_STR_NULLTERM_TOKEN = 298, /* H5T_STR_NULLTERM_TOKEN */
|
||||
H5T_STR_NULLPAD_TOKEN = 299, /* H5T_STR_NULLPAD_TOKEN */
|
||||
H5T_STR_SPACEPAD_TOKEN = 300, /* H5T_STR_SPACEPAD_TOKEN */
|
||||
H5T_CSET_ASCII_TOKEN = 301, /* H5T_CSET_ASCII_TOKEN */
|
||||
H5T_CSET_UTF8_TOKEN = 302, /* H5T_CSET_UTF8_TOKEN */
|
||||
H5T_C_S1_TOKEN = 303, /* H5T_C_S1_TOKEN */
|
||||
H5T_FORTRAN_S1_TOKEN = 304, /* H5T_FORTRAN_S1_TOKEN */
|
||||
H5T_OPAQUE_TOKEN = 305, /* H5T_OPAQUE_TOKEN */
|
||||
OPQ_SIZE_TOKEN = 306, /* OPQ_SIZE_TOKEN */
|
||||
OPQ_TAG_TOKEN = 307, /* OPQ_TAG_TOKEN */
|
||||
H5T_COMPOUND_TOKEN = 308, /* H5T_COMPOUND_TOKEN */
|
||||
H5T_ENUM_TOKEN = 309, /* H5T_ENUM_TOKEN */
|
||||
H5T_ARRAY_TOKEN = 310, /* H5T_ARRAY_TOKEN */
|
||||
H5T_VLEN_TOKEN = 311, /* H5T_VLEN_TOKEN */
|
||||
STRING = 312, /* STRING */
|
||||
NUMBER = 313 /* NUMBER */
|
||||
};
|
||||
typedef enum yytokentype yytoken_kind_t;
|
||||
#endif
|
||||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
union YYSTYPE
|
||||
{
|
||||
#line 69 "./hl/src/H5LTparse.y"
|
||||
#line 69 "hl/src//H5LTparse.y"
|
||||
|
||||
int ival; /*for integer token*/
|
||||
char *sval; /*for name string*/
|
||||
hid_t hid; /*for hid_t token*/
|
||||
|
||||
#line 122 "./hl/src/H5LTparse.h"
|
||||
#line 128 "hl/src//H5LTparse.h"
|
||||
|
||||
};
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
@ -129,6 +135,8 @@ typedef union YYSTYPE YYSTYPE;
|
||||
|
||||
extern YYSTYPE H5LTyylval;
|
||||
|
||||
|
||||
hid_t H5LTyyparse (void);
|
||||
|
||||
|
||||
#endif /* !YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED */
|
||||
|
@ -156,23 +156,27 @@ done:
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
hid_t fid; /* File id */
|
||||
hid_t fapl; /* File access property list */
|
||||
hid_t fid = H5I_INVALID_HID; /* File ID */
|
||||
hid_t fapl = H5I_INVALID_HID; /* File access property list */
|
||||
hsize_t cur_dims[1]; /* Dimension sizes */
|
||||
hsize_t max_dims[1]; /* Maximum dimension sizes */
|
||||
hsize_t cur2_dims[2]; /* Current dimension sizes */
|
||||
hsize_t max2_dims[2]; /* Maximum dimension sizes */
|
||||
hid_t set_tid, esc_set_tid; /* Compound type id */
|
||||
hid_t sub22_tid; /* Compound type id */
|
||||
hid_t sub2_tid, esc_sub2_tid; /* Compound type id */
|
||||
hid_t sub4_tid, esc_sub4_tid; /* Compound type id */
|
||||
hid_t null_did, null_sid; /* H5S_NULL dataset & dataspace ids */
|
||||
hid_t scalar_did, scalar_sid; /* H5S_SCALAR dataset & dataspace ids */
|
||||
hid_t set_tid = H5I_INVALID_HID; /* Compound type ID */
|
||||
hid_t esc_set_tid = H5I_INVALID_HID; /* Compound type ID */
|
||||
hid_t sub22_tid = H5I_INVALID_HID; /* Compound type ID */
|
||||
hid_t sub2_tid = H5I_INVALID_HID; /* Compound type ID */
|
||||
hid_t esc_sub2_tid = H5I_INVALID_HID; /* Compound type ID */
|
||||
hid_t sub4_tid = H5I_INVALID_HID; /* Compound type ID */
|
||||
hid_t esc_sub4_tid = H5I_INVALID_HID; /* Compound type ID */
|
||||
hid_t null_did = H5I_INVALID_HID; /* H5S_NULL dataset ID */
|
||||
hid_t null_sid = H5I_INVALID_HID; /* H5S_NULL dataspace ID */
|
||||
hid_t scalar_did = H5I_INVALID_HID; /* H5S_SCALAR dataset ID */
|
||||
hid_t scalar_sid = H5I_INVALID_HID; /* H5S_SCALAR dataspace ID */
|
||||
int one_data[ONE_DIMS0]; /* Buffer for data */
|
||||
int two_data[TWO_DIMS0 * TWO_DIMS1]; /* Buffer for data */
|
||||
set_t one_cbuf[ONE_DIMS0]; /* Buffer for data with compound type */
|
||||
set_t two_cbuf[TWO_DIMS0 * TWO_DIMS1]; /* Buffer for data with compound type */
|
||||
int i; /* Local index variable */
|
||||
|
||||
/* Create a file access property list */
|
||||
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
|
||||
@ -189,7 +193,7 @@ main(void)
|
||||
/* Initialization for one-dimensional dataset */
|
||||
cur_dims[0] = ONE_DIMS0;
|
||||
max_dims[0] = MAX_ONE_DIMS0;
|
||||
for (i = 0; i < ONE_DIMS0; i++)
|
||||
for (int i = 0; i < ONE_DIMS0; i++)
|
||||
one_data[i] = i;
|
||||
|
||||
/* Generate DSET_ONE, DSET_NONE, DSET_NOMAX, DSET_ALLOC_LATE, DSET_EARLY */
|
||||
@ -210,7 +214,7 @@ main(void)
|
||||
max2_dims[0] = MAX_TWO_DIMS0;
|
||||
max2_dims[1] = MAX_TWO_DIMS1;
|
||||
|
||||
for (i = 0; i < (TWO_DIMS0 * TWO_DIMS1); i++)
|
||||
for (int i = 0; i < (TWO_DIMS0 * TWO_DIMS1); i++)
|
||||
two_data[i] = i;
|
||||
|
||||
/* Generate DSET_TWO */
|
||||
@ -221,17 +225,17 @@ main(void)
|
||||
cur_dims[0] = ONE_DIMS0;
|
||||
max_dims[0] = MAX_ONE_DIMS0;
|
||||
|
||||
for (i = 0; i < ONE_DIMS0; i++) {
|
||||
for (int i = 0; i < ONE_DIMS0; i++) {
|
||||
one_cbuf[i].field1 = 1;
|
||||
one_cbuf[i].field2.a = 2;
|
||||
one_cbuf[i].field2.c = 4;
|
||||
one_cbuf[i].field2.b.a = 20;
|
||||
one_cbuf[i].field2.b.b = 40;
|
||||
one_cbuf[i].field2.b.c = 80;
|
||||
one_cbuf[i].field3 = 3.0f;
|
||||
one_cbuf[i].field3 = 3.0;
|
||||
one_cbuf[i].field4.a = 4;
|
||||
one_cbuf[i].field4.b = 8;
|
||||
} /* end for */
|
||||
}
|
||||
|
||||
/* Create the compound type */
|
||||
if ((sub22_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub22_t))) < 0)
|
||||
@ -310,17 +314,17 @@ main(void)
|
||||
max2_dims[0] = MAX_TWO_DIMS0;
|
||||
max2_dims[0] = MAX_TWO_DIMS1;
|
||||
|
||||
for (i = 0; i < (TWO_DIMS0 * TWO_DIMS1); i++) {
|
||||
for (int i = 0; i < (TWO_DIMS0 * TWO_DIMS1); i++) {
|
||||
two_cbuf[i].field1 = 1;
|
||||
two_cbuf[i].field2.a = 2;
|
||||
two_cbuf[i].field2.c = 4;
|
||||
two_cbuf[i].field2.b.a = 20;
|
||||
two_cbuf[i].field2.b.b = 40;
|
||||
two_cbuf[i].field2.b.c = 80;
|
||||
two_cbuf[i].field3 = 3.0f;
|
||||
two_cbuf[i].field3 = 3.0;
|
||||
two_cbuf[i].field4.a = 4;
|
||||
two_cbuf[i].field4.b = 8;
|
||||
} /* end for */
|
||||
}
|
||||
|
||||
/* Generate DSET_CMPD_TWO */
|
||||
if (generate_dset(fid, DSET_CMPD_TWO, 2, cur2_dims, max2_dims, set_tid, two_cbuf) < 0)
|
||||
|
@ -1531,8 +1531,11 @@ H5FD__family_delete(const char *filename, hid_t fapl_id)
|
||||
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate temporary member name")
|
||||
|
||||
/* Sanity check to make sure that generated names are unique */
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
HDsnprintf(member_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, filename, 0);
|
||||
HDsnprintf(temp, H5FD_FAM_MEMB_NAME_BUF_SIZE, filename, 1);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
|
||||
if (!HDstrcmp(member_name, temp)) {
|
||||
if (default_config) {
|
||||
temp = H5MM_xfree(temp);
|
||||
@ -1549,7 +1552,9 @@ H5FD__family_delete(const char *filename, hid_t fapl_id)
|
||||
current_member = 0;
|
||||
while (1) {
|
||||
/* Fix up the filename with the current member's number */
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
HDsnprintf(member_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, filename, current_member);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
|
||||
/* Attempt to delete the member files. If the first file throws an error
|
||||
* we always consider this an error. With subsequent member files, however,
|
||||
|
@ -742,9 +742,11 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
|
||||
HDassert(len == hdr->heap_size);
|
||||
|
||||
/* Set the shared heap header's file context for this operation */
|
||||
H5_GCC_CLANG_DIAG_OFF("discarded-qualifiers")
|
||||
H5_GCC_DIAG_OFF("discarded-qualifiers")
|
||||
H5_CLANG_DIAG_OFF("incompatible-pointer-types-discards-qualifiers")
|
||||
hdr->f = f;
|
||||
H5_GCC_CLANG_DIAG_ON("discarded-qualifiers")
|
||||
H5_GCC_DIAG_ON("discarded-qualifiers")
|
||||
H5_CLANG_DIAG_ON("incompatible-pointer-types-discards-qualifiers")
|
||||
|
||||
/* Magic number */
|
||||
H5MM_memcpy(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
@ -1330,9 +1332,11 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
|
||||
hdr = iblock->hdr;
|
||||
|
||||
/* Set the shared heap header's file context for this operation */
|
||||
H5_GCC_CLANG_DIAG_OFF("discarded-qualifiers")
|
||||
H5_GCC_DIAG_OFF("discarded-qualifiers")
|
||||
H5_CLANG_DIAG_OFF("incompatible-pointer-types-discards-qualifiers")
|
||||
hdr->f = f;
|
||||
H5_GCC_CLANG_DIAG_ON("discarded-qualifiers")
|
||||
H5_GCC_DIAG_ON("discarded-qualifiers")
|
||||
H5_CLANG_DIAG_ON("incompatible-pointer-types-discards-qualifiers")
|
||||
|
||||
/* Magic number */
|
||||
H5MM_memcpy(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
|
@ -71,6 +71,7 @@ insert_libhdf5_settings(FILE *flibinfo)
|
||||
*/
|
||||
HDfprintf(flibinfo, "#include \"H5private.h\"\n");
|
||||
HDfprintf(flibinfo, "H5_GCC_DIAG_OFF(\"larger-than=\")\n\n");
|
||||
HDfprintf(flibinfo, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n\n");
|
||||
|
||||
/* Print variable definition and the string. Do not use const or some
|
||||
* platforms (AIX?) will have issues.
|
||||
@ -110,6 +111,7 @@ insert_libhdf5_settings(FILE *flibinfo)
|
||||
|
||||
/* Re-enable warnings for large arrays */
|
||||
HDfprintf(rawoutstream, "H5_GCC_DIAG_ON(\"larger-than=\")\n");
|
||||
HDfprintf(rawoutstream, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n");
|
||||
#else
|
||||
/* Print variable definition and an empty string. Do not use const or some
|
||||
* platforms (AIX?) will have issues.
|
||||
|
@ -3069,12 +3069,12 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
hw = (unsigned char *)&hw_f;
|
||||
}
|
||||
else if (FLT_DOUBLE == dst_type) {
|
||||
hw_d = *((float *)aligned);
|
||||
hw_d = (double)*((float *)aligned);
|
||||
hw = (unsigned char *)&hw_d;
|
||||
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
|
||||
}
|
||||
else {
|
||||
hw_ld = *((float *)aligned);
|
||||
hw_ld = (long double)*((float *)aligned);
|
||||
hw = (unsigned char *)&hw_ld;
|
||||
#endif
|
||||
}
|
||||
@ -3093,7 +3093,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
|
||||
}
|
||||
else {
|
||||
hw_ld = *((double *)aligned);
|
||||
hw_ld = (long double)*((double *)aligned);
|
||||
hw = (unsigned char *)&hw_ld;
|
||||
#endif
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ main(void)
|
||||
if ((ret = encode_plist(dxpl1, little_endian, word_length, "testfiles/plist_files/def_dxpl_")) < 0)
|
||||
assert(ret > 0);
|
||||
|
||||
if ((ret = H5Pset_btree_ratios(dxpl1, 0.2f, 0.6f, 0.2f)) < 0)
|
||||
if ((ret = H5Pset_btree_ratios(dxpl1, 0.2, 0.6, 0.2)) < 0)
|
||||
assert(ret > 0);
|
||||
if ((ret = H5Pset_hyper_vector_size(dxpl1, 5)) < 0)
|
||||
assert(ret > 0);
|
||||
@ -336,7 +336,7 @@ main(void)
|
||||
assert(ret > 0);
|
||||
if ((ret = H5Pset_alignment(fapl1, 2, 1024)) < 0)
|
||||
assert(ret > 0);
|
||||
if ((ret = H5Pset_cache(fapl1, 1024, 128, 10485760, 0.3f)) < 0)
|
||||
if ((ret = H5Pset_cache(fapl1, 1024, 128, 10485760, 0.3)) < 0)
|
||||
assert(ret > 0);
|
||||
if ((ret = H5Pset_elink_file_cache_size(fapl1, 10485760)) < 0)
|
||||
assert(ret > 0);
|
||||
|
@ -2734,7 +2734,7 @@ diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di
|
||||
HDmemcpy(&temp2_long, mem2, sizeof(long));
|
||||
/* -d and !-p */
|
||||
if (opts->delta_bool && !opts->percent_bool) {
|
||||
if (ABS(temp1_long - temp2_long) > opts->delta) {
|
||||
if (ABS(temp1_long - temp2_long) > (long)opts->delta) {
|
||||
opts->print_percentage = 0;
|
||||
print_pos(opts, elem_idx, 0);
|
||||
if (print_data(opts)) {
|
||||
@ -2776,7 +2776,7 @@ diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di
|
||||
}
|
||||
nfound++;
|
||||
}
|
||||
else if (per > opts->percent && ABS(temp1_long - temp2_long) > opts->delta) {
|
||||
else if (per > opts->percent && ABS(temp1_long - temp2_long) > (long)opts->delta) {
|
||||
opts->print_percentage = 1;
|
||||
print_pos(opts, elem_idx, 0);
|
||||
if (print_data(opts)) {
|
||||
@ -2822,7 +2822,7 @@ diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
|
||||
HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long));
|
||||
/* -d and !-p */
|
||||
if (opts->delta_bool && !opts->percent_bool) {
|
||||
if (PDIFF(temp1_ulong, temp2_ulong) > opts->delta) {
|
||||
if (PDIFF(temp1_ulong, temp2_ulong) > (unsigned long)opts->delta) {
|
||||
opts->print_percentage = 0;
|
||||
print_pos(opts, elem_idx, 0);
|
||||
if (print_data(opts)) {
|
||||
@ -2866,7 +2866,7 @@ diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
|
||||
}
|
||||
nfound++;
|
||||
}
|
||||
else if (per > opts->percent && PDIFF(temp1_ulong, temp2_ulong) > opts->delta) {
|
||||
else if (per > opts->percent && PDIFF(temp1_ulong, temp2_ulong) > (unsigned long)opts->delta) {
|
||||
opts->print_percentage = 1;
|
||||
print_pos(opts, elem_idx, 0);
|
||||
if (print_data(opts)) {
|
||||
@ -2913,7 +2913,7 @@ diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
|
||||
|
||||
/* -d and !-p */
|
||||
if (opts->delta_bool && !opts->percent_bool) {
|
||||
if (ABS(temp1_llong - temp2_llong) > opts->delta) {
|
||||
if (ABS(temp1_llong - temp2_llong) > (long long)opts->delta) {
|
||||
opts->print_percentage = 0;
|
||||
print_pos(opts, elem_idx, 0);
|
||||
if (print_data(opts)) {
|
||||
@ -2957,7 +2957,7 @@ diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
|
||||
}
|
||||
nfound++;
|
||||
}
|
||||
else if (per > opts->percent && ABS(temp1_llong - temp2_llong) > opts->delta) {
|
||||
else if (per > opts->percent && ABS(temp1_llong - temp2_llong) > (long long)opts->delta) {
|
||||
opts->print_percentage = 1;
|
||||
print_pos(opts, elem_idx, 0);
|
||||
if (print_data(opts)) {
|
||||
|
@ -740,8 +740,10 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
|
||||
for (indx = 0; indx < nblocks; indx++) {
|
||||
unsigned loop_indx;
|
||||
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
h5tools_str_append(buffer, outputformat.dset_blockformat_pre, indx ? "," OPTIONAL_LINE_BREAK " " : "",
|
||||
(unsigned long)indx);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
|
||||
/* Start coordinates and opposite corner */
|
||||
for (loop_indx = 0; loop_indx < ndims; loop_indx++)
|
||||
@ -1097,8 +1099,10 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
|
||||
for (indx = 0; indx < npoints; indx++) {
|
||||
unsigned loop_indx;
|
||||
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
h5tools_str_append(buffer, outputformat.dset_ptformat_pre, indx ? "," OPTIONAL_LINE_BREAK " " : "",
|
||||
(unsigned long)indx);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
|
||||
for (loop_indx = 0; loop_indx < ndims; loop_indx++)
|
||||
h5tools_str_append(buffer, "%s%" PRIuHSIZE, loop_indx ? "," : "(",
|
||||
|
@ -264,7 +264,9 @@ h5tools_str_fmt(h5tools_str_t *str /*in,out*/, size_t start, const char *fmt)
|
||||
|
||||
/* Reset the output string and append a formatted version */
|
||||
h5tools_str_trunc(str, start);
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
h5tools_str_append(str, fmt, temp);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
|
||||
/* Free the temp buffer if we allocated one */
|
||||
if (temp != _temp)
|
||||
@ -300,11 +302,18 @@ h5tools_str_prefix(h5tools_str_t *str /*in,out*/, const h5tool_format_t *info, h
|
||||
if (i)
|
||||
h5tools_str_append(str, "%s", OPT(info->idx_sep, ","));
|
||||
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
h5tools_str_append(str, OPT(info->idx_n_fmt, "%" PRIuHSIZE), (hsize_t)ctx->pos[i]);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
}
|
||||
}
|
||||
else /* Scalar */
|
||||
else {
|
||||
/* Scalar */
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
h5tools_str_append(str, OPT(info->idx_n_fmt, "%" PRIuHSIZE), (hsize_t)elmtno);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
}
|
||||
|
||||
H5TOOLS_DEBUG("str=%s", str->s);
|
||||
|
||||
H5TOOLS_ENDDEBUG(" ");
|
||||
@ -341,11 +350,18 @@ h5tools_str_region_prefix(h5tools_str_t *str /*in,out*/, const h5tool_format_t *
|
||||
if (i)
|
||||
h5tools_str_append(str, "%s", OPT(info->idx_sep, ","));
|
||||
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
h5tools_str_append(str, OPT(info->idx_n_fmt, "%" PRIuHSIZE), (hsize_t)ctx->pos[i]);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
}
|
||||
}
|
||||
else /* Scalar */
|
||||
else {
|
||||
/* Scalar */
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
h5tools_str_append(str, OPT(info->idx_n_fmt, "%" PRIuHSIZE), (hsize_t)0);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
}
|
||||
|
||||
H5TOOLS_DEBUG("str=%s", str->s);
|
||||
|
||||
H5TOOLS_ENDDEBUG(" ");
|
||||
@ -463,6 +479,7 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, const h5tool_for
|
||||
for (u = 0; u < nblocks; u++) {
|
||||
unsigned v;
|
||||
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
h5tools_str_append(str, info->dset_blockformat_pre, u ? "," OPTIONAL_LINE_BREAK " " : "",
|
||||
(unsigned long)u);
|
||||
|
||||
@ -474,6 +491,7 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, const h5tool_for
|
||||
h5tools_str_append(str, "%s%" PRIuHSIZE, v ? "," : ")-(", ptdata[u * 2 * ndims + v + ndims]);
|
||||
|
||||
h5tools_str_append(str, ")");
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
}
|
||||
|
||||
HDfree(ptdata);
|
||||
@ -522,6 +540,7 @@ h5tools_str_dump_space_points(h5tools_str_t *str, hid_t rspace, const h5tool_for
|
||||
for (u = 0; u < npoints; u++) {
|
||||
unsigned v;
|
||||
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
h5tools_str_append(str, info->dset_ptformat_pre, u ? "," OPTIONAL_LINE_BREAK " " : "",
|
||||
(unsigned long)u);
|
||||
|
||||
@ -529,6 +548,7 @@ h5tools_str_dump_space_points(h5tools_str_t *str, hid_t rspace, const h5tool_for
|
||||
h5tools_str_append(str, "%s%" PRIuHSIZE, v ? "," : "(", (ptdata[u * ndims + v]));
|
||||
|
||||
h5tools_str_append(str, ")");
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
}
|
||||
|
||||
HDfree(ptdata);
|
||||
@ -657,6 +677,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
|
||||
H5T_class_t type_class;
|
||||
char * ret_value = NULL;
|
||||
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
|
||||
H5TOOLS_START_DEBUG(" ");
|
||||
/* Build default formats for long long types */
|
||||
if (!fmt_llong[0]) {
|
||||
@ -1320,6 +1342,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
|
||||
|
||||
ret_value = h5tools_str_fmt(str, start, OPT(info->elmt_fmt, "%s"));
|
||||
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
|
||||
H5TOOLS_ENDDEBUG(" with %s", ret_value);
|
||||
return ret_value;
|
||||
}
|
||||
|
@ -91,6 +91,8 @@ main(int argc, char *argv[])
|
||||
const char *err9 = "Cannot specify more than 30 input files in one call to h5import.\n";
|
||||
const char *err10 = "Length of output file name limited to 255 chars.\n";
|
||||
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
|
||||
h5tools_setprogname(PROGRAMNAME);
|
||||
h5tools_setstatus(EXIT_SUCCESS);
|
||||
|
||||
@ -236,6 +238,8 @@ main(int argc, char *argv[])
|
||||
if (process(opt) == -1)
|
||||
goto err;
|
||||
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
|
||||
for (i = 0; i < opt->fcount; i++) {
|
||||
in = &(opt->infiles[i].in);
|
||||
if (in->sizeOfDimension)
|
||||
@ -364,6 +368,8 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
|
||||
const char *err11 = "Error in reading string data.\n";
|
||||
int retval = -1;
|
||||
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* special case for opening binary classes in H5_HAVE_WIN32_API
|
||||
* "FP" denotes a floating point binary file,
|
||||
@ -450,13 +456,15 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
|
||||
goto error;
|
||||
}
|
||||
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
|
||||
/* Set success return value */
|
||||
retval = 0;
|
||||
|
||||
error:
|
||||
if (strm)
|
||||
HDfclose(strm);
|
||||
return (retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -1429,10 +1437,12 @@ processConfigurationFile(char *infile, struct Input *in)
|
||||
const char *err19 = "Unable to get integer value.\n";
|
||||
const char *err20 = "Unable to get subset values.\n";
|
||||
|
||||
/* create vector to map which keywords have been found
|
||||
check vector after each keyword to check for violation
|
||||
at the end check vector to see if required fields have been provided
|
||||
process the output file according to the options
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
|
||||
/* - create vector to map which keywords have been found
|
||||
* - check vector after each keyword to check for violation
|
||||
* - at the end check vector to see if required fields have been provided
|
||||
* - process the output file according to the options
|
||||
*/
|
||||
|
||||
/* Initialize machine endian */
|
||||
@ -2429,13 +2439,15 @@ processConfigurationFile(char *infile, struct Input *in)
|
||||
}
|
||||
}
|
||||
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
|
||||
/* Set success return value */
|
||||
retval = 0;
|
||||
|
||||
error:
|
||||
if (strm)
|
||||
HDfclose(strm);
|
||||
return (retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -4610,6 +4622,8 @@ process(struct Options *opt)
|
||||
"Error in creating the output data set. Dataset with the same name may exist at the specified path\n";
|
||||
const char *err6 = "Error in writing the output data set.\n";
|
||||
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
|
||||
H5E_BEGIN_TRY
|
||||
{
|
||||
if ((file_id = H5Fopen(opt->outfile, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
|
||||
@ -4742,8 +4756,10 @@ process(struct Options *opt)
|
||||
|
||||
} /* STR */
|
||||
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
|
||||
H5Fclose(file_id);
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint16_t
|
||||
|
@ -1087,7 +1087,9 @@ output_report(const char *fmt, ...)
|
||||
va_list ap;
|
||||
|
||||
HDva_start(ap, fmt);
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
HDvfprintf(output, fmt, ap);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
HDva_end(ap);
|
||||
}
|
||||
}
|
||||
|
@ -1298,7 +1298,9 @@ do_cleanupfile(iotype iot, char *filename)
|
||||
|
||||
if (driver == H5FD_FAMILY) {
|
||||
for (j = 0; /*void*/; j++) {
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
HDsnprintf(temp, temp_sz, filename, j);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
|
||||
if (HDaccess(temp, F_OK) < 0)
|
||||
break;
|
||||
|
@ -647,7 +647,9 @@ output_report(const char *fmt, ...)
|
||||
va_list ap;
|
||||
|
||||
HDva_start(ap, fmt);
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
HDvfprintf(output, fmt, ap);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
HDva_end(ap);
|
||||
}
|
||||
|
||||
|
@ -151,6 +151,7 @@ get_size(const char *progname, int *argno, int argc, char *argv[])
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
@ -507,3 +508,4 @@ main(int argc, char *argv[])
|
||||
HDfree(buf);
|
||||
return EXIT_SUCCESS;
|
||||
} /* end main */
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
|
@ -87,7 +87,9 @@ error(const char *fmt, ...)
|
||||
|
||||
va_start(ap, fmt);
|
||||
HDfprintf(stderr, "%s: error: ", prog);
|
||||
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
|
||||
HDvfprintf(stderr, fmt, ap);
|
||||
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
|
||||
HDfprintf(stderr, "\n");
|
||||
va_end(ap);
|
||||
HDexit(EXIT_FAILURE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user