diff --git a/icu4c/source/test/cintltst/ccapitst.c b/icu4c/source/test/cintltst/ccapitst.c index b238ee65d7c..9d529e3deab 100644 --- a/icu4c/source/test/cintltst/ccapitst.c +++ b/icu4c/source/test/cintltst/ccapitst.c @@ -837,8 +837,11 @@ static void TestConvert() /*Reads the BOM*/ - size_t numRead = fread(&BOM, sizeof(UChar), 1, ucs_file_in); - (void)numRead; + { + // Note: gcc produces a compile warning if the return value from fread() is ignored. + size_t numRead = fread(&BOM, sizeof(UChar), 1, ucs_file_in); + (void)numRead; + } if (BOM!=0xFEFF && BOM!=0xFFFE) { log_err("File Missing BOM...Bailing!\n");