1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-16 06:15:08 -05:00

Fix build warnings with --disable-nls

The gettext functions return a "char *", so do the same for the defines
in the case where gettext is unavailable.  This prevents a number of
warnings about const being dropped.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2013-12-21 18:04:41 +10:00
parent f7f8964c23
commit 452ee39de1
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@
/* define _() as shortcut for gettext() */ /* define _() as shortcut for gettext() */
#define _(str) dgettext ("libalpm", str) #define _(str) dgettext ("libalpm", str)
#else #else
#define _(s) s #define _(s) (char *)s
#endif #endif
void _alpm_alloc_fail(size_t size); void _alpm_alloc_fail(size_t size);

View File

@ -34,8 +34,8 @@
#define _(str) gettext(str) #define _(str) gettext(str)
#define _n(str1, str2, ct) ngettext(str1, str2, ct) #define _n(str1, str2, ct) ngettext(str1, str2, ct)
#else #else
#define _(str) str #define _(str) (char *)str
#define _n(str1, str2, ct) (ct == 1 ? str1 : str2) #define _n(str1, str2, ct) (char *)(ct == 1 ? str1 : str2)
#endif #endif
typedef struct _pm_target_t { typedef struct _pm_target_t {