Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ext/Devel-Peek/Peek.xs: Eliminate one warning in gcc build #14457

Closed
p5pRT opened this issue Feb 1, 2015 · 6 comments
Closed

ext/Devel-Peek/Peek.xs: Eliminate one warning in gcc build #14457

p5pRT opened this issue Feb 1, 2015 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 1, 2015

Migrated from rt.perl.org#123704 (status was 'resolved')

Searchable as RT123704$

@p5pRT
Copy link
Author

p5pRT commented Feb 1, 2015

From @jkeenan

The patch attached should eliminate one warning generated during 'make' when built with gcc.

I have this smoking in the 'smoke-me/jkeenan/peek-xs' branch.

Please review. Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Feb 1, 2015

From @jkeenan

0001-Reverse-const-static-to-avoid-old-style-declaration-.patch
From 999b04be3a014e8cf01638db7a64926536aa0a88 Mon Sep 17 00:00:00 2001
From: James E Keenan <jkeenan@cpan.org>
Date: Sat, 31 Jan 2015 20:44:27 -0500
Subject: [PATCH] Reverse 'const static' to avoid 'old-style-declaration'
 warning.

---
 ext/Devel-Peek/Peek.pm | 2 +-
 ext/Devel-Peek/Peek.xs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ext/Devel-Peek/Peek.pm b/ext/Devel-Peek/Peek.pm
index f3adcfc..bbea3cd 100644
--- a/ext/Devel-Peek/Peek.pm
+++ b/ext/Devel-Peek/Peek.pm
@@ -3,7 +3,7 @@
 
 package Devel::Peek;
 
-$VERSION = '1.21';
+$VERSION = '1.22';
 $XS_VERSION = $VERSION;
 $VERSION = eval $VERSION;
 
diff --git a/ext/Devel-Peek/Peek.xs b/ext/Devel-Peek/Peek.xs
index 856ff77..132cad7 100644
--- a/ext/Devel-Peek/Peek.xs
+++ b/ext/Devel-Peek/Peek.xs
@@ -406,7 +406,7 @@ S_ck_dump(pTHX_ OP *entersubop, GV *namegv, SV *cv)
     return (OP *)newop;
 }
 
-const static XOP my_xop = {
+static const XOP my_xop = {
     XOPf_xop_name|XOPf_xop_desc|XOPf_xop_class,		/* xop_flags */
     "Devel_Peek_Dump",					/* xop_name */
     "Dump",						/* xop_desc */
-- 
1.9.1

@p5pRT
Copy link
Author

p5pRT commented Feb 1, 2015

From @jkeenan

Summary of my perl5 (revision 5 version 21 subversion 9) configuration​:
  Commit id​: 999b04be3a014e8cf01638db7a64926536aa0a88
  Platform​:
  osname=linux, osvers=3.13.0-45-generic, archname=x86_64-linux
  uname='linux zareason 3.13.0-45-generic #74-ubuntu smp tue jan 13 19​:36​:28 utc 2015 x86_64 x86_64 x86_64 gnulinux '
  config_args='-des -Dusedevel -Dcc=g++'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=undef, usemultiplicity=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='g++', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2',
  cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.8.2', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='g++', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/include/c++/4.8 /usr/include/x86_64-linux-gnu/c++/4.8 /usr/include/c++/4.8/backward /usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64
  libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.19'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
  PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
  PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT
  USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME
  USE_PERLIO USE_PERL_ATOF
  Built under linux
  Compiled at Jan 31 2015 20​:51​:40
  %ENV​:
  PERL5LIB="/home/jkeenan/perl5/lib/perl5"
  PERLBREW_BASHRC_VERSION="0.67"
  PERLBREW_HOME="/home/jkeenan/.perlbrew"
  PERLBREW_MANPATH="/home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/man"
  PERLBREW_PATH="/home/jkeenan/perl5/perlbrew/bin​:/home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/bin"
  PERLBREW_PERL="perl-5.20.1"
  PERLBREW_ROOT="/home/jkeenan/perl5/perlbrew"
  PERLBREW_VERSION="0.67"
  PERL_LOCAL_LIB_ROOT="/home/jkeenan/perl5"
  PERL_MB_OPT="--install_base "/home/jkeenan/perl5""
  PERL_MM_OPT="INSTALL_BASE=/home/jkeenan/perl5"
  PERL_WORKDIR="gitwork/perl"
  @​INC​:
  lib
  /home/jkeenan/perl5/lib/perl5/x86_64-linux
  /home/jkeenan/perl5/lib/perl5
  /usr/local/lib/perl5/site_perl/5.21.9/x86_64-linux
  /usr/local/lib/perl5/site_perl/5.21.9
  /usr/local/lib/perl5/5.21.9/x86_64-linux
  /usr/local/lib/perl5/5.21.9
  .

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2015

From @tonycoz

On Sat Jan 31 18​:18​:49 2015, jkeenan wrote​:

The patch attached should eliminate one warning generated during
'make' when built with gcc.

I have this smoking in the 'smoke-me/jkeenan/peek-xs' branch.

Please review. Thank you very much.

Thanks applied as 76e8359.

Tony

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2015

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2015

@tonycoz - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant