mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 09:21:03 +00:00
ICU-4707 Fix some compiler warnings
X-SVN-Rev: 19390
This commit is contained in:
parent
a6e52426c3
commit
a977c0adc7
1 changed files with 10 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1997-2005, International Business Machines
|
||||
* Copyright (C) 1997-2006, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
******************************************************************************
|
||||
|
@ -564,7 +564,6 @@ umtx_atomic_dec(int32_t *p) {
|
|||
U_CAPI void U_EXPORT2
|
||||
u_setAtomicIncDecFunctions(const void *context, UMtxAtomicFn *ip, UMtxAtomicFn *dp,
|
||||
UErrorCode *status) {
|
||||
int32_t testInt;
|
||||
if (U_FAILURE(*status)) {
|
||||
return;
|
||||
}
|
||||
|
@ -583,11 +582,15 @@ u_setAtomicIncDecFunctions(const void *context, UMtxAtomicFn *ip, UMtxAtomicFn *
|
|||
pDecFn = dp;
|
||||
gIncDecContext = context;
|
||||
|
||||
testInt = 0;
|
||||
U_ASSERT(umtx_atomic_inc(&testInt) == 1); /* Sanity Check. Do the functions work at all? */
|
||||
U_ASSERT(testInt == 1);
|
||||
U_ASSERT(umtx_atomic_dec(&testInt) == 0);
|
||||
U_ASSERT(testInt == 0);
|
||||
#if !U_RELEASE
|
||||
{
|
||||
int32_t testInt = 0;
|
||||
U_ASSERT(umtx_atomic_inc(&testInt) == 1); /* Sanity Check. Do the functions work at all? */
|
||||
U_ASSERT(testInt == 1);
|
||||
U_ASSERT(umtx_atomic_dec(&testInt) == 0);
|
||||
U_ASSERT(testInt == 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue