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

Fix hb_atomic_ptr_cmpexch -Wunused-value warnings
pull/76/head
Behdad Esfahbod 10 years ago
commit 365c03fc2b
  1. 2
      src/hb-common.cc
  2. 4
      src/hb-icu.cc

@ -345,7 +345,7 @@ hb_language_get_default (void)
hb_language_t language = (hb_language_t) hb_atomic_ptr_get (&default_language);
if (unlikely (language == HB_LANGUAGE_INVALID)) {
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;

@ -363,10 +363,8 @@ hb_icu_get_unicode_funcs (void)
if (!hb_atomic_ptr_get (&normalizer)) {
UErrorCode icu_err = U_ZERO_ERROR;
/* 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
return const_cast<hb_unicode_funcs_t *> (&_hb_icu_unicode_funcs);
}

Loading…
Cancel
Save