]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix a test failure of msgfmt-desktop-2 on HP-UX with cc.
authorBruno Haible <bruno@clisp.org>
Tue, 24 Dec 2019 19:02:27 +0000 (20:02 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Apr 2020 11:39:01 +0000 (13:39 +0200)
* gettext-tools/src/write-desktop.c (msgfmt_desktop_handle_pair): Don't cast
directly from 'void *' to 'bool'.

gettext-tools/src/write-desktop.c

index 0ca9367ae759c46194f9794796b0ac692babd7b0..319ac50ed70fca8bc67cf7327f6b2d763224523d 100644 (file)
@@ -1,6 +1,5 @@
 /* Writing Desktop Entry files.
-   Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016 Free
-   Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016, 2019 Free Software Foundation, Inc.
    This file was written by Daiki Ueno <ueno@gnu.org>.
 
    This program is free software: you can redistribute it and/or modify
@@ -74,7 +73,7 @@ msgfmt_desktop_handle_pair (desktop_reader_ty *reader,
       if (hash_find_entry (msgfmt_reader->keywords, key, strlen (key),
                            &keyword_value) == 0)
         {
-          bool is_list = (bool) keyword_value;
+          bool is_list = (bool) (uintptr_t) keyword_value;
           char *unescaped = desktop_unescape_string (value, is_list);
           size_t i;