--- Begin Message ---
Subject: |
LT__UNUSED in libltdl/ltdl.c and compiler warning |
Date: |
Fri, 27 Dec 2013 20:34:25 +0100 |
User-agent: |
Internet Messaging Program (IMP) H5 (6.1.6) |
Hello,
my GCC 4.8.3 20131226 (prerelease) produces the warning in
libltdl/ltdl.c, when compiled with -Wall -Wextra:
CC libltdl/libltdl_libltdlc_la-ltdl.lo
libltdl/ltdl.c: In function ‘load_deplibs’:
libltdl/ltdl.c:818:53: warning: unused parameter ‘deplibs’
[-Wunused-parameter]
load_deplibs (lt_dlhandle handle, char * LT__UNUSED deplibs)
^
which warning is fixed with the patch below.
By the way the warning disappears, in all these cases:
load_deplibs (lt_dlhandle handle, LT__UNUSED char * deplibs)
load_deplibs (lt_dlhandle handle, char LT__UNUSED * deplibs)
load_deplibs (lt_dlhandle handle, char * deplibs LT__UNUSED)
Reading
http://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute-Syntax I do
not see how LT__UNUSED between * and deplibs shall be wrong, but the
compiler emits the warnings.
libtool master# git describe
v2.4.2.418-11-g4494446
Kind regards
Dilyan Palauzov
diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c
index 43c4e62..f8649a4 100644
--- a/libltdl/ltdl.c
+++ b/libltdl/ltdl.c
@@ -815,7 +815,7 @@ find_handle (const char *search_path, const char
*base_name,
#if !defined LTDL_DLOPEN_DEPLIBS
static int
-load_deplibs (lt_dlhandle handle, char * LT__UNUSED deplibs)
+load_deplibs (lt_dlhandle handle, LT__UNUSED char * deplibs)
{
handle->depcount = 0;
return 0;
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#16268: LT__UNUSED in libltdl/ltdl.c and compiler warning |
Date: |
Thu, 4 Dec 2014 17:55:42 +0000 |
On Dec 27, 2013, at 7:34 PM, Dilyan Palauzov <address@hidden> wrote:
>
> Hello,
>
> my GCC 4.8.3 20131226 (prerelease) produces the warning in libltdl/ltdl.c,
> when compiled with -Wall -Wextra:
>
> CC libltdl/libltdl_libltdlc_la-ltdl.lo
> libltdl/ltdl.c: In function ‘load_deplibs’:
> libltdl/ltdl.c:818:53: warning: unused parameter ‘deplibs’
> [-Wunused-parameter]
> load_deplibs (lt_dlhandle handle, char * LT__UNUSED deplibs)
> ^
> which warning is fixed with the patch below.
>
> By the way the warning disappears, in all these cases:
> load_deplibs (lt_dlhandle handle, LT__UNUSED char * deplibs)
> load_deplibs (lt_dlhandle handle, char LT__UNUSED * deplibs)
> load_deplibs (lt_dlhandle handle, char * deplibs LT__UNUSED)
>
> Reading
> http://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute-Syntax I do
> not see how LT__UNUSED between * and deplibs shall be wrong, but the compiler
> emits the warnings.
ACK. Fixed in current master.
Thanks for the report.
Cheers,
--
Gary V. Vaughan (gary AT gnu DOT org)
--- End Message ---