X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..HEAD:/icuSources/test/cintltst/trietest.c diff --git a/icuSources/test/cintltst/trietest.c b/icuSources/test/cintltst/trietest.c index ac595b67..b70bf539 100644 --- a/icuSources/test/cintltst/trietest.c +++ b/icuSources/test/cintltst/trietest.c @@ -1,12 +1,14 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /* ****************************************************************************** * -* Copyright (C) 2001-2011, International Business Machines +* Copyright (C) 2001-2016, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** * file name: trietest.c -* encoding: US-ASCII +* encoding: UTF-8 * tab size: 8 (not used) * indentation:4 * @@ -32,8 +34,6 @@ #define u_errorName(errorCode) "some error code" #endif -#define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0])) - /* Values for setting possibly overlapping, out-of-order ranges of values */ typedef struct SetRange { UChar32 start, limit; @@ -120,6 +120,7 @@ _testFoldingOffset16(uint32_t data) { static uint32_t U_CALLCONV _testEnumValue(const void *context, uint32_t value) { + (void)context; // suppress compiler warnings about unused variable return value^0x5555; } @@ -801,20 +802,21 @@ checkRanges3[]={ static void TrieTest(void) { testTrieRanges4("set1", - setRanges1, ARRAY_LENGTH(setRanges1), - checkRanges1, ARRAY_LENGTH(checkRanges1)); + setRanges1, UPRV_LENGTHOF(setRanges1), + checkRanges1, UPRV_LENGTHOF(checkRanges1)); testTrieRanges4("set2-overlap", - setRanges2, ARRAY_LENGTH(setRanges2), - checkRanges2, ARRAY_LENGTH(checkRanges2)); + setRanges2, UPRV_LENGTHOF(setRanges2), + checkRanges2, UPRV_LENGTHOF(checkRanges2)); testTrieRanges4("set3-initial-9", - setRanges3, ARRAY_LENGTH(setRanges3), - checkRanges3, ARRAY_LENGTH(checkRanges3)); + setRanges3, UPRV_LENGTHOF(setRanges3), + checkRanges3, UPRV_LENGTHOF(checkRanges3)); } /* test utrie_unserializeDummy() -------------------------------------------- */ static int32_t U_CALLCONV dummyGetFoldingOffset(uint32_t data) { + (void)data; // suppress compiler warnings about unused variable return -1; /* never get non-initialValue data for supplementary code points */ }