Skip to content

Commit ac8cab1

Browse files
committed
locale.c: Silence unused variable compiler warning
On some systems this was unused. Now that we have C99, we can move the declaration and some #ifdef's and not declare it unless it is going to be used.
1 parent 7c4aa46 commit ac8cab1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

locale.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8363,20 +8363,22 @@ S_ints_to_tm(pTHX_ struct tm * mytm,
83638363
mytm->tm_year = year;
83648364

83658365
struct tm * which_tm = mytm;
8366-
struct tm aux_tm;
83678366

83688367
#ifndef HAS_MKTIME
83698368

83708369
mini_mktime(mytm);
83718370

83728371
#else
8372+
# if defined(HAS_TM_TM_GMTOFF) || defined(HAS_TM_TM_ZONE)
8373+
# define ALWAYS_RUN_MKTIME
8374+
8375+
struct tm aux_tm;
8376+
8377+
# endif
83738378

83748379
/* On platforms that have either of these two fields, we have to run the
83758380
* libc mktime() in order to set them, as mini_mktime() doesn't deal with
83768381
* them. [perl #18238] */
8377-
# if defined(HAS_TM_TM_GMTOFF) || defined(HAS_TM_TM_ZONE)
8378-
# define ALWAYS_RUN_MKTIME
8379-
# endif
83808382

83818383
/* When isdst is 0, it means to consider daylight savings time as never
83828384
* being in effect. Many libc implementations of mktime() do not allow

0 commit comments

Comments
 (0)