X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/efa1e6592fb03ce23b15276b2b91d885a3ee7da5..57a6839dcb3bba09e8228b822b290604668416fe:/icuSources/test/cintltst/spooftest.c diff --git a/icuSources/test/cintltst/spooftest.c b/icuSources/test/cintltst/spooftest.c index 7096ad26..d90f8878 100644 --- a/icuSources/test/cintltst/spooftest.c +++ b/icuSources/test/cintltst/spooftest.c @@ -132,9 +132,9 @@ static void TestUSpoofCAPI(void) { const char *dataSrcDir; char *fileName; char *confusables; - int confusablesLength; + int confusablesLength = 0; char *confusablesWholeScript; - int confusablesWholeScriptLength; + int confusablesWholeScriptLength = 0; FILE *f; UParseError pe; int32_t errType; @@ -148,8 +148,8 @@ static void TestUSpoofCAPI(void) { TEST_ASSERT_NE(f, NULL); confusables = malloc(3000000); if (f != NULL) { - confusablesLength = fread(confusables, 1, 3000000, f); - fclose(f); + confusablesLength = fread(confusables, 1, 3000000, f); + fclose(f); } strcpy(fileName, dataSrcDir); @@ -158,8 +158,8 @@ static void TestUSpoofCAPI(void) { TEST_ASSERT_NE(f, NULL); confusablesWholeScript = malloc(1000000); if (f != NULL) { - confusablesWholeScriptLength = fread(confusablesWholeScript, 1, 1000000, f); - fclose(f); + confusablesWholeScriptLength = fread(confusablesWholeScript, 1, 1000000, f); + fclose(f); } rsc = uspoof_openFromSource(confusables, confusablesLength,