mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Use the address-of operator when checking for weak symbols
This fixes a warning with gcc on OS X
This commit is contained in:
parent
a91e8887cd
commit
1786a7cdc4
1 changed files with 3 additions and 3 deletions
|
@ -861,21 +861,21 @@ static int wcsncasecmp_fallback(const wchar_t *a, const wchar_t *b, size_t count
|
|||
/* Note parens avoid the macro expansion */
|
||||
wchar_t *wcsdup_use_weak(const wchar_t *a)
|
||||
{
|
||||
if (wcsdup != NULL)
|
||||
if (&wcsdup != NULL)
|
||||
return (wcsdup)(a);
|
||||
return wcsdup_fallback(a);
|
||||
}
|
||||
|
||||
int wcscasecmp_use_weak(const wchar_t *a, const wchar_t *b)
|
||||
{
|
||||
if (wcscasecmp != NULL)
|
||||
if (&wcscasecmp != NULL)
|
||||
return (wcscasecmp)(a, b);
|
||||
return wcscasecmp_fallback(a, b);
|
||||
}
|
||||
|
||||
int wcsncasecmp_use_weak(const wchar_t *s1, const wchar_t *s2, size_t n)
|
||||
{
|
||||
if (wcsncasecmp != NULL)
|
||||
if (&wcsncasecmp != NULL)
|
||||
return (wcsncasecmp)(s1, s2, n);
|
||||
return wcsncasecmp_fallback(s1, s2, n);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue