delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
X-Recipient: | geda-user AT delorie DOT com |
X-Original-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=gmail.com; s=20120113; | |
h=date:from:to:subject:message-id:mail-followup-to:references | |
:mime-version:content-disposition:content-transfer-encoding | |
:in-reply-to:user-agent; | |
bh=IYIAGhKpxvmK44qRkFDptcyMaQJmmMhtrt3oNSn4R5k=; | |
b=GO88GAvRPpIwvnZNULtpwNzis04VH/f9zKfce4tlESEtFhLCY7LjfgYb5aGCIRwKwK | |
U2YIT5sK4vFq3PehxdoVRZoWJ2vA7sutm0rHGJ5IshZ2rxlH5YrECvwC++igo4plzDQA | |
wbeY8qlzLordLQUZeDXkQ5NR7alc68L7b1JCDK05el+6e93G790/8LVEcIPeFBzE4DED | |
f1Jp1uso5SU73osFYYF+3mGzhhrk2laSoa9NUvuTXuXEwl18uP9QAgeTYBXec+xRHgqc | |
JiaotaamiaiLV7INed7NQmLh8i7YaWeO/PVGLBmIMfTq05DayP6wp29EYs0Z+bW7IgKF | |
KBng== | |
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=1e100.net; s=20130820; | |
h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to | |
:references:mime-version:content-disposition | |
:content-transfer-encoding:in-reply-to:user-agent; | |
bh=IYIAGhKpxvmK44qRkFDptcyMaQJmmMhtrt3oNSn4R5k=; | |
b=fAURXxYqXdlFo2dsqLWa+ZeWgbuWrDhikrrvLJyX5XQO66HMWYGFj+7T7H0XPzBnrU | |
Yj7GdiO424Kdbr2/s5UVl7kLRtYzg5Kpr411o7NdurvYhmx85qyGs3Yzpci9lbw9Slqn | |
Q8mxzn0v0HxNUrZr2eQrg/L8xSW3F74Tekdf2A/T+3d4iSMctGBSg9HcYfDSPb8FhQyE | |
woBR1KkYrUOBJLlt7j58jEWC0vR0zAhTYn2iUB3FAgzq+4Xku7rFF+wgWH3R0AvptxJK | |
kxIGtoyPhw65HFqVgnzhBY+G5Gg14vE5VEtPTq2XORwBmqLaezyu++YPp8JKQ1+ThnF8 | |
u6qQ== | |
X-Gm-Message-State: | AD7BkJJLFODUNkZpW1PhUNn6MXu4iD4g6s9o6OSaoNYBcDAzhnPS7h//XG76v2rMeS5oPg== |
X-Received: | by 10.25.33.140 with SMTP id h134mr7613761lfh.159.1457344488985; |
Mon, 07 Mar 2016 01:54:48 -0800 (PST) | |
Date: | Mon, 7 Mar 2016 12:54:46 +0300 |
From: | "Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> |
To: | geda-user AT delorie DOT com |
Subject: | Re: [geda-user] anyone know how to get rid of these warnings |
Message-ID: | <20160307095446.GA2780@localhost.localdomain> |
Mail-Followup-To: | geda-user AT delorie DOT com |
References: | <CAC4O8c8Lj0cNu4PDo8yqLnB0jVbLRF1GF9oVs2UFnttDt-BXZw AT mail DOT gmail DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <CAC4O8c8Lj0cNu4PDo8yqLnB0jVbLRF1GF9oVs2UFnttDt-BXZw@mail.gmail.com> |
User-Agent: | Mutt/1.5.23 (2014-03-12) |
Reply-To: | geda-user AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | geda-user AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On Sun, Mar 06, 2016 at 06:13:05PM -0900, Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com] wrote: > This stuff is about the last I'm aware of then could build with > -Werror and not have to watch for useful warnings. -Wunused-value is > sometimes useful so I don't like to just turn it off. I have no idea > about how gettext works though. > > gcc -std=gnu99 -DLOCALEDIR=\"/tmp/junk/share/locale\" -DHAVE_CONFIG_H > -I. -I.. -I.. -I./hid/gtk -I/usr/include > -I/home/bkerin/local/include/dbus-1.0 > -I/home/bkerin/local/lib/dbus-1.0/include > -I/home/bkerin/local/include/glib-2.0 > -I/home/bkerin/local/lib/glib-2.0/include -pthread > -I/home/bkerin/local/include/gtk-2.0 > -I/home/bkerin/local/lib/gtk-2.0/include > -I/home/bkerin/local/include/atk-1.0 > -I/home/bkerin/local/include/cairo > -I/home/bkerin/local/include/gdk-pixbuf-2.0 > -I/home/bkerin/local/include/pango-1.0 > -I/home/bkerin/local/include/glib-2.0 > -I/home/bkerin/local/lib/glib-2.0/include > -I/home/bkerin/local/include/pixman-1 -I/home/bkerin/local/include > -I/home/bkerin/local/include/freetype2 > -I/home/bkerin/local/include/harfbuzz -I/usr/include/libpng12 > -I/usr/include -pthread -I/home/bkerin/local/include/gtk-2.0 > -I/home/bkerin/local/lib/gtk-2.0/include > -I/home/bkerin/local/include/pango-1.0 > -I/home/bkerin/local/include/gdk-pixbuf-2.0 > -I/home/bkerin/local/include/glib-2.0 > -I/home/bkerin/local/lib/glib-2.0/include > -I/home/bkerin/local/include/cairo > -I/home/bkerin/local/include/pixman-1 -I/home/bkerin/local/include > -I/home/bkerin/local/include/freetype2 > -I/home/bkerin/local/include/atk-1.0 > -I/home/bkerin/local/include/harfbuzz -I/usr/include/gtkglext-1.0 > -I/usr/lib/gtkglext-1.0/include -I/usr/include/libpng12 -pthread > -pthread -DPREFIXDIR=\"/tmp/junk\" -DBINDIR=\"/tmp/junk/bin\" > -DHOST=\"i686-pc-linux-gnu\" -DPCBLIBDIR=\"/tmp/junk/share/pcb\" > -DPCBTREEDIR=\"/tmp/junk/share/pcb/newlib\" > -DPCBTREEPATH=\"/tmp/junk/share/pcb/newlib:/tmp/junk/share/pcb/pcblib-newlib\" > -Wall -g -O2 -Wno-declaration-after-statement -MT > hid/gtk/libgtk_a-gui-trackball.o -MD -MP -MF > hid/gtk/.deps/libgtk_a-gui-trackball.Tpo -c -o > hid/gtk/libgtk_a-gui-trackball.o `test -f 'hid/gtk/gui-trackball.c' || > echo './'`hid/gtk/gui-trackball.c > In file included from ./global.h:84:0, > from hid/gtk/ghid-route-style-selector.h:8, > from hid/gtk/gui-top-window.c:77: > hid/gtk/gui-top-window.c: In function ‘ghid_parse_arguments’: > ./gettext.h:98:5: warning: statement with no effect [-Wunused-value] > ((void) (Domainname), (const char *) (Dirname)) > ^ > hid/gtk/gui-top-window.c:1796:3: note: in expansion of macro ‘bindtextdomain’ > bindtextdomain (PACKAGE, LOCALEDIR); > ^ > ./gettext.h:95:33: warning: statement with no effect [-Wunused-value] > # define textdomain(Domainname) ((const char *) (Domainname)) > ^ > hid/gtk/gui-top-window.c:1797:3: note: in expansion of macro ‘textdomain’ > textdomain (PACKAGE); > ^ > ./gettext.h:101:5: warning: statement with no effect [-Wunused-value] > ((void) (Domainname), (const char *) (Codeset)) > ^ > hid/gtk/gui-top-window.c:1798:3: note: in expansion of macro > ‘bind_textdomain_codeset’ > bind_textdomain_codeset (PACKAGE, "UTF-8"); > ^ > The PACKAGE variable must be properly efined to be working. In geda-gaf we explicitly define it for various programs. For example: bind_textdomain_codeset("geda-gschem", "UTF-8") in gschem/src/gschem.c for gschem. The same for other programs, i.e. gnetlist, gattrib and so on. For libgeda localization, we use the variable LIBGEDA_GETTEXT_DOMAIN which is predefined in the autoconf's m4 directory which, in turn, is defined in configure.ac as the macro definition directory: AC_CONFIG_MACRO_DIR([m4]) In your case, I see the functions for gettext textdomain definition are already used in pcb's main.c, so IMO there is no need to use them again in the gtk hid sources. Please read 'info gettext' and search for description of the functions textdomain(), bindtextdomain() and bind_textdomain_codeset() for more information. HTH, Vladimir
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |