diff options
author | Sean McBride <sean@rogue-research.com> | 2023-06-19 05:13:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-19 05:13:38 (GMT) |
commit | 65d8c9347010771473b53c91adcec2f281772213 (patch) | |
tree | 487567dae0dc005de896f616b90e67744239a5e2 /test/onion.c | |
parent | 1f20354ee6cdfa9fd157ac9cdfff9acdf320a32d (diff) | |
download | hdf5-65d8c9347010771473b53c91adcec2f281772213.zip hdf5-65d8c9347010771473b53c91adcec2f281772213.tar.gz hdf5-65d8c9347010771473b53c91adcec2f281772213.tar.bz2 |
Many fixes to various compiler warnings (#3124)
* Fixed various -Wmissing-variable-declarations by adding static keyword
* In a few cases, renamed the variable suffix from _g to _s.
* Fixed some -Wmissing-variable-declarations by using different declaration macros
* Fixed various -Wconditional-uninitialized warnings by just initializing variable to zero
* Fixed various -Wcomma warnings
* Fixed clang -Wstrict-prototypes warnings
* Fixed various -Wunused-variable warnings
* Updated some casts to fix the only 3 -Wcast-qual warnings
* Fixed the only -Wsometimes-uninitialized warning
Diffstat (limited to 'test/onion.c')
-rw-r--r-- | test/onion.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/onion.c b/test/onion.c index 830220d..da1eb12 100644 --- a/test/onion.c +++ b/test/onion.c @@ -91,18 +91,18 @@ static unsigned int flags_create_s = 0; */ /* twenty-six four-character words beginning with 'a' -> 104 bytes */ -const unsigned char *a_list_s = +static const unsigned char *a_list_s = (const unsigned char *)"abetableacedacesacheacidacneadzeafaragedagesaidsairsajarallyalum" "amokantsapesarcsareaartsasksaspsavidaxes"; uint64_t a_list_size_s = 104; /* fifty-three four-character words beginning with 'b' -> 212 bytes */ -const unsigned char *b_list_s = +static const unsigned char *b_list_s = (const unsigned char *)"badebailbaitbalebanebarebaskbeambeanbearbeenbeerbeltbentbestbide" "bikebilebindbirdbiteblipblueboarboatbobsbodyboilboldbollboltbond" "boneboobboorboosbootbradbragbratbraybrewbritbrowbuckbudsbunkbunt" "buoyburnburybustbuys"; -uint64_t b_list_size_s = 212; +static uint64_t b_list_size_s = 212; /* Allocate and populate filepaths with h5_fixname'd strings as appropriate. * Should be released with onion_filepaths_destroy() when done. @@ -912,9 +912,10 @@ test_header_encode_decode(void) ptr = exp + H5FD_ONION_ENCODED_SIZE_HEADER - 4; UINT32ENCODE(ptr, checksum); - hdr.version = H5FD_ONION_HEADER_VERSION_CURR; - hdr.flags = 12; - hdr.origin_eof = 8589934609ull, hdr.page_size = 4096; + hdr.version = H5FD_ONION_HEADER_VERSION_CURR; + hdr.flags = 12; + hdr.origin_eof = 8589934609ull; + hdr.page_size = 4096; hdr.history_addr = 123456; hdr.history_size = 88; |