Discussion:
Change 34940: setenv_getix() is not used anywhere other than util.c (and the "special
(too old to reply)
nwc10+ (Nicholas Clark)
2008-11-26 23:30:03 UTC
Permalink
Change 34940 by ***@nicholas-saigo on 2008/11/26 23:20:31

setenv_getix() is not used anywhere other than util.c (and the "special
biologist word for stable" Msql-Mysql-modules-1.2219) so make it
static.

Affected files ...

... //depot/perl/embed.fnc#649 edit
... //depot/perl/embed.h#786 edit
... //depot/perl/proto.h#983 edit
... //depot/perl/util.c#671 edit

Differences ...

==== //depot/perl/embed.fnc#649 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#648~34938~ 2008-11-26 15:02:47.000000000 -0800
+++ perl/embed.fnc 2008-11-26 15:20:31.000000000 -0800
@@ -839,8 +839,8 @@
p |OP* |scope |NULLOK OP* o
Ap |char* |screaminstr |NN SV *bigstr|NN SV *littlestr|I32 start_shift \
|I32 end_shift|NN I32 *old_posp|I32 last
-#if !defined(VMS)
-p |I32 |setenv_getix |NN const char* nam
+#if !defined(VMS) && defined(PERL_IN_UTIL_C)
+s |I32 |setenv_getix |NN const char* nam
#endif
Apd |void |setdefout |NULLOK GV* gv
Ap |HEK* |share_hek |NN const char* str|I32 len|U32 hash

==== //depot/perl/embed.h#786 (text+w) ====
Index: perl/embed.h
--- perl/embed.h#785~34938~ 2008-11-26 15:02:47.000000000 -0800
+++ perl/embed.h 2008-11-26 15:20:31.000000000 -0800
@@ -838,9 +838,9 @@
#define scope Perl_scope
#endif
#define screaminstr Perl_screaminstr
-#if !defined(VMS)
+#if !defined(VMS) && defined(PERL_IN_UTIL_C)
#ifdef PERL_CORE
-#define setenv_getix Perl_setenv_getix
+#define setenv_getix S_setenv_getix
#endif
#endif
#define setdefout Perl_setdefout
@@ -3185,9 +3185,9 @@
#define scope(a) Perl_scope(aTHX_ a)
#endif
#define screaminstr(a,b,c,d,e,f) Perl_screaminstr(aTHX_ a,b,c,d,e,f)
-#if !defined(VMS)
+#if !defined(VMS) && defined(PERL_IN_UTIL_C)
#ifdef PERL_CORE
-#define setenv_getix(a) Perl_setenv_getix(aTHX_ a)
+#define setenv_getix(a) S_setenv_getix(aTHX_ a)
#endif
#endif
#define setdefout(a) Perl_setdefout(aTHX_ a)

==== //depot/perl/proto.h#983 (text+w) ====
Index: perl/proto.h
--- perl/proto.h#982~34938~ 2008-11-26 15:02:47.000000000 -0800
+++ perl/proto.h 2008-11-26 15:20:31.000000000 -0800
@@ -2961,8 +2961,8 @@
#define PERL_ARGS_ASSERT_SCREAMINSTR \
assert(bigstr); assert(littlestr); assert(old_posp)

-#if !defined(VMS)
-PERL_CALLCONV I32 Perl_setenv_getix(pTHX_ const char* nam)
+#if !defined(VMS) && defined(PERL_IN_UTIL_C)
+STATIC I32 S_setenv_getix(pTHX_ const char* nam)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_SETENV_GETIX \
assert(nam)

==== //depot/perl/util.c#671 (text) ====
Index: perl/util.c
--- perl/util.c#670~34934~ 2008-11-26 14:04:01.000000000 -0800
+++ perl/util.c 2008-11-26 15:20:31.000000000 -0800
@@ -1774,8 +1774,8 @@
#endif /* WIN32 || NETWARE */

#ifndef PERL_MICRO
-I32
-Perl_setenv_getix(pTHX_ const char *nam)
+static I32
+S_setenv_getix(pTHX_ const char *nam)
{
register I32 i;
register const I32 len = strlen(nam);
End of Patch.
Jerry D. Hedden
2008-11-28 19:24:02 UTC
Permalink
This change causes the following build warning under Cygwin:

CCCMD = gcc -DPERL_CORE -c -DPERL_PATCHNUM=34950
-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -DNO_MATHOMS
-fno-strict-aliasing -pipe -Os -pipe -funit-at-a-time -march=pentium4
-mfpmath=sse -mieee-fp -mmmx -msse -msse2 -Wall -W -Wextra
-Wdeclaration-after-statement -Wendif-labels
util.c:1779: warning: 'S_setenv_getix' defined but not used

(Sorry no patch from me. I tried to figure out a good way
to fix it, but it looks really messy.)
Post by nwc10+ (Nicholas Clark)
setenv_getix() is not used anywhere other than util.c (and the "special
biologist word for stable" Msql-Mysql-modules-1.2219) so make it
static.
Affected files ...
... //depot/perl/embed.fnc#649 edit
... //depot/perl/embed.h#786 edit
... //depot/perl/proto.h#983 edit
... //depot/perl/util.c#671 edit
Differences ...
...
Post by nwc10+ (Nicholas Clark)
==== //depot/perl/util.c#671 (text) ====
Index: perl/util.c
--- perl/util.c#670~34934~ 2008-11-26 14:04:01.000000000 -0800
+++ perl/util.c 2008-11-26 15:20:31.000000000 -0800
@@ -1774,8 +1774,8 @@
#endif /* WIN32 || NETWARE */
#ifndef PERL_MICRO
-I32
-Perl_setenv_getix(pTHX_ const char *nam)
+static I32
+S_setenv_getix(pTHX_ const char *nam)
{
register I32 i;
register const I32 len = strlen(nam);
End of Patch.
Loading...