develooper Front page | perl.perl5.porters | Postings from March 2000

[PATCH v5.5.670] unused Perl___notused

From:
Doug MacEachern
Date:
March 4, 2000 16:21
Subject:
[PATCH v5.5.670] unused Perl___notused
Message ID:
Pine.LNX.4.10.10003041614030.16885-100000@mojo.covalent.net
xs code compiled with -Wall generates a pile of these warnings from gcc:
 warning: unused variable `Perl___notused'

patch below quiets things down.

--- perl.h~	Wed Mar  1 00:15:44 2000
+++ perl.h	Sat Mar  4 16:12:28 2000
@@ -151,6 +151,14 @@
 
 */
 
+#ifndef NEXT30_NO_ATTRIBUTE
+#  ifndef HASATTRIBUTE       /* disable GNU-cc attribute checking? */
+#    ifdef  __attribute__      /* Avoid possible redefinition errors */
+#      undef  __attribute__
+#    endif
+#    define __attribute__(attr)
+#  endif
+#endif
 
 class CPerlObj;
 
@@ -221,7 +229,7 @@
 #endif
 
 #define NOOP (void)0
-#define dNOOP extern int Perl___notused
+#define dNOOP extern int __attribute__ ((unused)) Perl___notused
 
 #ifndef pTHX
 #  define pTHX		void
@@ -2660,15 +2668,6 @@
 #ifndef PERL_CALLCONV
 #  define PERL_CALLCONV
 #endif 
-
-#ifndef NEXT30_NO_ATTRIBUTE
-#  ifndef HASATTRIBUTE       /* disable GNU-cc attribute checking? */
-#    ifdef  __attribute__      /* Avoid possible redefinition errors */
-#      undef  __attribute__
-#    endif
-#    define __attribute__(attr)
-#  endif
-#endif
 
 #ifdef PERL_OBJECT
 #  define PERL_DECL_PROT
--- patchlevel.h~	Wed Mar  1 00:15:43 2000
+++ patchlevel.h	Sat Mar  4 16:10:37 2000
@@ -68,7 +68,7 @@
 	applied different patches than you.
  */
 #if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT)
-static	char	*local_patches[] = {
+static	char	* __attribute__ ((unused)) local_patches[] = {
 	NULL
 	,NULL
 };




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About