Merge pull request #75 from cpeterso/cpeterso/Wunused-value

Fix hb_atomic_ptr_cmpexch -Wunused-value warnings
This commit is contained in:
Behdad Esfahbod 2015-01-03 21:55:30 -08:00
commit 365c03fc2b
2 changed files with 2 additions and 4 deletions

View File

@ -345,7 +345,7 @@ hb_language_get_default (void)
hb_language_t language = (hb_language_t) hb_atomic_ptr_get (&default_language); hb_language_t language = (hb_language_t) hb_atomic_ptr_get (&default_language);
if (unlikely (language == HB_LANGUAGE_INVALID)) { if (unlikely (language == HB_LANGUAGE_INVALID)) {
language = hb_language_from_string (setlocale (LC_CTYPE, NULL), -1); language = hb_language_from_string (setlocale (LC_CTYPE, NULL), -1);
hb_atomic_ptr_cmpexch (&default_language, HB_LANGUAGE_INVALID, language); (void) hb_atomic_ptr_cmpexch (&default_language, HB_LANGUAGE_INVALID, language);
} }
return default_language; return default_language;

View File

@ -363,10 +363,8 @@ hb_icu_get_unicode_funcs (void)
if (!hb_atomic_ptr_get (&normalizer)) { if (!hb_atomic_ptr_get (&normalizer)) {
UErrorCode icu_err = U_ZERO_ERROR; UErrorCode icu_err = U_ZERO_ERROR;
/* We ignore failure in getNFCInstace(). */ /* We ignore failure in getNFCInstace(). */
hb_atomic_ptr_cmpexch (&normalizer, NULL, unorm2_getNFCInstance (&icu_err)); (void) hb_atomic_ptr_cmpexch (&normalizer, NULL, unorm2_getNFCInstance (&icu_err));
} }
#endif #endif
return const_cast<hb_unicode_funcs_t *> (&_hb_icu_unicode_funcs); return const_cast<hb_unicode_funcs_t *> (&_hb_icu_unicode_funcs);
} }