Hi all, im new to the list, im interested in grinding away at some of the warnings wine generates...
make depend was complaining about some static inline functions that it thinks arent used, this patch uses __attribute__ ((used)) to disable the warning.
Glenn
On Sun, Apr 19, 2009 at 8:00 PM, Glenn L. McGrath bug1@westvic.com.au wrote:
Hi all, im new to the list, im interested in grinding away at some of the warnings wine generates...
make depend was complaining about some static inline functions that it thinks arent used, this patch uses __attribute__ ((used)) to disable the warning.
Glenn
Patches should be sent to wine-patches@winehq.org.
Glenn L. McGrath wrote:
Hi all, im new to the list, im interested in grinding away at some of the warnings wine generates...
Welcome to Wine, and thanks!
Be cautioned that open source projects can be brutal and mean places.
I think Wine is one of the nicer ones, but that mostly means that our common evil is to ignore you. Please don't feel hurt if that happens; I'd suggest reading the web site for hints if you get stymied, and hanging out on irc at #winehackers is often a good way to get more informal and chatty help.
Cheers,
Jeremy
Glenn L. McGrath wrote:
Hi all, im new to the list, im interested in grinding away at some of the warnings wine generates...
make depend was complaining about some static inline functions that it thinks arent used, this patch uses __attribute__ ((used)) to disable the warning.
Glenn
Glenn:
What compiler was complaining about the static inline problem? Your solution may cause problems with other compilers.
James McKenzie
2009/4/20 James McKenzie jjmckenzie51@earthlink.net:
What compiler was complaining about the static inline problem? Your solution may cause problems with other compilers.
More specifically, you need to protect this with an #ifdef.
E.g.:
#ifdef __GNUC__ #define __WINE_ATTR_UNUSED __attribute__((unused)) #else #define __WINE_ATTR_UNUSED #endif ... static inline void __WINE_ATTR_UNUSED list_add_head( struct list *list, struct list *elem ) { ... }
On Mo, 2009-04-20 at 10:01 +0200, Henri Verbeet wrote:
More specifically, you need to protect this with an #ifdef.
#ifdef __GNUC__ #define __WINE_ATTR_UNUSED __attribute__((unused)) #else #define __WINE_ATTR_UNUSED #endif
Support for compiler specific features should be tested during configure.
2009/4/20 Detlef Riekenberg wine.dev@web.de:
Support for compiler specific features should be tested during configure.
What would that look like, approximately?
2009/4/20 Detlef Riekenberg wine.dev@web.de:
On Mo, 2009-04-20 at 10:01 +0200, Henri Verbeet wrote:
More specifically, you need to protect this with an #ifdef.
#ifdef __GNUC__ #define __WINE_ATTR_UNUSED __attribute__((unused)) #else #define __WINE_ATTR_UNUSED #endif
Support for compiler specific features should be tested during configure.
From http://autoconf-archive.cryp.to/ax_c___attribute__.html:
AC_DEFUN([AX_C___ATTRIBUTE__], [ AC_CACHE_CHECK([for __attribute__], [ax_cv___attribute__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <stdlib.h> static void foo(void) __attribute__ ((unused)); static void foo(void) { exit(1); } ]], [])], [ax_cv___attribute__=yes], [ax_cv___attribute__=no] ) ]) if test "$ax_cv___attribute__" = "yes"; then AC_DEFINE([HAVE___ATTRIBUTE__], 1, [define if your compiler has __attribute__]) fi ])
then:
#ifdef HAVE___ATTRIBUTE__ #define __WINE_ATTR_UNUSED __attribute__((unused)) #else #define __WINE_ATTR_UNUSED #endif
- Reece