Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion locale.c
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,9 @@ S_parse_LC_ALL_string(pTHX_ const char * string,
}
}

const char * msg;
/* Some compilers don't realize all paths initialize this */
const char * msg = NULL;

const char * display_start = s;
const char * display_end = e;

Expand Down
1 change: 1 addition & 0 deletions mg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3803,6 +3803,7 @@ Perl_perly_sighandler(int sig, Siginfo_t *sip PERL_UNUSED_DECL,
/* Not clear if this will work */
/* XXX not clear if this should be protected by 'if (safe)'
* too */
PERL_UNUSED_ARG(safe);

(void)rsignal(sig, SIG_IGN);
(void)rsignal(sig, PL_csighandlerp);
Expand Down
4 changes: 3 additions & 1 deletion perl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4406,7 +4406,9 @@ S_init_ids(pTHX)
bool
Perl_doing_taint(int argc, char *argv[], char *envp[])
{
#ifndef PERL_IMPLICIT_SYS
#ifdef PERL_IMPLICIT_SYS
PERL_UNUSED_ARG(envp);
#else
/* If we have PERL_IMPLICIT_SYS we can't call getuid() et alia
* before we have an interpreter-- and the whole point of this
* function is to be called at such an early stage. If you are on
Expand Down
6 changes: 3 additions & 3 deletions pp_hot.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ PP(pp_aelemfastlex_store)

/* inlined av_fetch() for simple cases ... */
if (!SvRMAGICAL(av) && key >=0 && key <= AvFILLp(av)) {
targ = AvARRAY(av)[key];
targ = AvARRAY(av)[ (U8) key ];
}
/* ... else do it the hard way */
if (!targ) {
Expand Down Expand Up @@ -1590,7 +1590,7 @@ PP(pp_readline)
SvGETMAGIC(arg);

/* unrolled tryAMAGICunTARGETlist(iter_amg, 0) */
SV *tmpsv;
SV *tmpsv = NULL;
U8 gimme = GIMME_V;
if (UNLIKELY(SvAMAGIC(arg) &&
(tmpsv = amagic_call(arg, &PL_sv_undef, iter_amg,
Expand Down Expand Up @@ -2033,7 +2033,7 @@ PP(pp_aelemfast)

/* inlined av_fetch() for simple cases ... */
if (!SvRMAGICAL(av) && key >= 0 && key <= AvFILLp(av)) {
sv = AvARRAY(av)[key];
sv = AvARRAY(av)[ (U8) key ];
if (sv)
goto ret;
if (!lval) {
Expand Down
3 changes: 2 additions & 1 deletion pp_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ PP(pp_glob)

/* unrolled
tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL)); */
SV *tmpsv;
SV *tmpsv = NULL;
U8 gimme = GIMME_V;
if (UNLIKELY(SvAMAGIC(arg) &&
(tmpsv = amagic_call(arg, &PL_sv_undef, iter_amg,
Expand Down Expand Up @@ -5558,6 +5558,7 @@ PP_wrapped(pp_shostent, 1, 0)
{
dSP;
const int stayopen = TOPi;
PERL_UNUSED_VAR(stayopen);
switch(PL_op->op_type) {
case OP_SHOSTENT:
#ifdef HAS_SETHOSTENT
Expand Down
2 changes: 1 addition & 1 deletion toke.c
Original file line number Diff line number Diff line change
Expand Up @@ -12458,7 +12458,7 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp)
const char *lastub = NULL; /* position of last underbar */
static const char* const number_too_long = "Number too long";
bool warned_about_underscore = 0;
I32 shift; /* shift per digit for hex/oct/bin, hoisted here for fp */
I32 shift = 0; /* shift per digit for hex/oct/bin, hoisted here for fp */
#define WARN_ABOUT_UNDERSCORE() \
do { \
if (!warned_about_underscore) { \
Expand Down
1 change: 1 addition & 0 deletions util.c
Original file line number Diff line number Diff line change
Expand Up @@ -2940,6 +2940,7 @@ Perl_rsignal(pTHX_ int signo, Sighandler_t handler)
static Signal_t
sig_trap(int signo)
{
PERL_UNUSED_ARG(signo);
PL_sig_trapped++;
}

Expand Down
10 changes: 5 additions & 5 deletions win32/fcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* Copyright (C) 1993 Eric Young - see README for more details */
#include <stdio.h>
#include <errno.h>
#include "EXTERN.h"
#include "perl.h"

/* Eric Young.
* This version of crypt has been developed from my MIT compatible
Expand Down Expand Up @@ -466,12 +468,10 @@ unsigned const char cov_2char[64]={
};

/* the salt for classic DES crypt (which is all we implement here)
permits [./0-9A-Za-z], since '.' and '/' immediately precede
'0' we don't need individual checks for '.' and '/'
permits [./0-9A-Za-z], since '.' and '/' are adjacent, we don't need
individual checks for them
*/
#define good_for_salt(c) \
((c) >= '.' && (c) <= '9' || (c) >= 'A' && (c) <= 'Z' || \
(c) >= 'a' && (c) <= 'z')
#define good_for_salt(c) (isALPHANUMERIC(c) || inRANGE((c), '.', '/'))

char *
des_fcrypt(const char *buf, const char *salt, char *buff)
Expand Down
2 changes: 1 addition & 1 deletion win32/perllib.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ EXTERN_C /* GCC in C++ mode mangles the name, otherwise */
BOOL APIENTRY
DllMain(HINSTANCE hModule, /* DLL module handle */
DWORD fdwReason, /* reason called */
LPVOID lpvReserved) /* reserved */
LPVOID) /* reserved */
{
switch (fdwReason) {
/* The DLL is attaching to a process due to process
Expand Down
51 changes: 28 additions & 23 deletions win32/vmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,33 @@ inline void MEMODSlx(char *str, long x)
Even though perl links with ucrtbase.dll, there is alot of overhead for
using ::new() operator. Just implement our own ::new(), more C-style. */
#define VMEM_H_NEW_OP \
void* operator new(size_t size) noexcept { \
void * p = (void*)win32_malloc(size); \
if(!p) noperl_die("%s%s","Out of memory in perl:", "???"); return p; }; \
void* operator new[](size_t size) noexcept { \
void * p = (void*)win32_malloc(size); \
if(!p) noperl_die("%s%s","Out of memory in perl:", "???"); return p; }; \
void* operator new( size_t size, int block_use, \
char const* file_name, int line_number) noexcept { \
UNREFERENCED_PARAMETER(block_use); \
UNREFERENCED_PARAMETER(file_name); \
UNREFERENCED_PARAMETER(line_number); \
void * p = (void*)win32_malloc(size); \
if(!p) noperl_die("%s%s","Out of memory in perl:", "???"); return p; \
}; \
void* operator new[]( size_t size, int block_use, \
char const* file_name, int line_number) noexcept { \
UNREFERENCED_PARAMETER(block_use); \
UNREFERENCED_PARAMETER(file_name); \
UNREFERENCED_PARAMETER(line_number); \
void * p = (void*)win32_malloc(size); \
if(!p) noperl_die("%s%s","Out of memory in perl:", "???"); return p; }; \
void operator delete (void* p) noexcept { win32_free(p); return; }; \
void* operator new(size_t size) noexcept { \
void * p = (void*)win32_malloc(size); \
if (!p) noperl_die("%s%s","Out of memory in perl:", "???"); \
return p; \
}; \
void* operator new[](size_t size) noexcept { \
void * p = (void*)win32_malloc(size); \
if (!p) noperl_die("%s%s","Out of memory in perl:", "???"); \
return p; }; \
void* operator new( size_t size, int block_use, \
char const* file_name, int line_number) noexcept {\
UNREFERENCED_PARAMETER(block_use); \
UNREFERENCED_PARAMETER(file_name); \
UNREFERENCED_PARAMETER(line_number); \
void * p = (void*)win32_malloc(size); \
if(!p) noperl_die("%s%s","Out of memory in perl:", "???"); \
return p; \
}; \
void* operator new[]( size_t size, int block_use, \
char const* file_name, int line_number) noexcept {\
UNREFERENCED_PARAMETER(block_use); \
UNREFERENCED_PARAMETER(file_name); \
UNREFERENCED_PARAMETER(line_number); \
void * p = (void*)win32_malloc(size); \
if(!p) noperl_die("%s%s","Out of memory in perl:", "???"); \
return p; }; \
void operator delete (void* p) noexcept { win32_free(p); return; }; \
void operator delete[] (void* p) noexcept { win32_free(p); return; }


Expand Down Expand Up @@ -210,7 +215,7 @@ VMem::VMem(void)
{
#ifdef _USE_LINKED_LIST
InitializeCriticalSection(&m_cs);
#endif _USE_LINKED_LIST
#endif /* _USE_LINKED_LIST */
m_lRefCount = 1;
return;
}
Expand Down
3 changes: 2 additions & 1 deletion win32/win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@
# define NOMEMMGR /* GUI IPC RPC malloc buffers */
# define NOMENUS /* GUI Menu obj */
# define NOMETAFILE /* file format for half rendered graphics */
# define NOMINMAX /* "Macros min(a,b) and max(a,b)" OBSOL/UNIMPL/FUT */
# undef NOMINMAX /* "Macros min(a,b) and max(a,b)" OBSOL/UNIMPL/FUT */
# define NOMINMAX
# define NOMSG /* GUI Message loop */
/* #define NONLS "Wide" Code Page conversion APIs */
/* OBSOL/UNIMPL/FUT "OpenFile(), OemToAnsi, AnsiToOem" etc */
Expand Down
7 changes: 7 additions & 0 deletions win32/win32sck.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,13 +780,16 @@ win32_getnetent(void)
struct netent *
win32_getnetbyname(char *name)
{
PERL_UNUSED_ARG(name);
win32_croak_not_implemented("getnetbyname");
return (struct netent *)NULL;
}

struct netent *
win32_getnetbyaddr(long net, int type)
{
PERL_UNUSED_ARG(net);
PERL_UNUSED_ARG(type);
win32_croak_not_implemented("getnetbyaddr");
return (struct netent *)NULL;
}
Expand All @@ -808,27 +811,31 @@ win32_getservent(void)
void
win32_sethostent(int stayopen)
{
PERL_UNUSED_ARG(stayopen);
win32_croak_not_implemented("sethostent");
}


void
win32_setnetent(int stayopen)
{
PERL_UNUSED_ARG(stayopen);
win32_croak_not_implemented("setnetent");
}


void
win32_setprotoent(int stayopen)
{
PERL_UNUSED_ARG(stayopen);
win32_croak_not_implemented("setprotoent");
}


void
win32_setservent(int stayopen)
{
PERL_UNUSED_ARG(stayopen);
win32_croak_not_implemented("setservent");
}

Expand Down
Loading