Subject: | gcc -Wall -Wextra cleanups |
Patch attached.
Subject: | 0001-gcc-Wall-Wextra-cleanups.patch |
From 01ed65a7ef4e9930bf01002451d9ad12a11306f9 Mon Sep 17 00:00:00 2001
From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Fri, 5 Dec 2014 21:37:25 -0500
Subject: [PATCH] gcc -Wall -Wextra cleanups.
---
cpan/Time-Piece/Piece.xs | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/cpan/Time-Piece/Piece.xs b/cpan/Time-Piece/Piece.xs
index 0798b34..f60e96c 100644
--- a/cpan/Time-Piece/Piece.xs
+++ b/cpan/Time-Piece/Piece.xs
@@ -449,6 +449,8 @@ _strptime(pTHX_ const char *buf, const char *fmt, struct tm *tm, int *got_GMT)
len;
int Ealternative, Oalternative;
+ (void)copyright;
+ (void)sccsid;
/* There seems to be a slightly improved version at
* http://www.opensource.apple.com/source/Libc/Libc-583/stdtime/strptime-fbsd.c
* which we may end up borrowing more from
@@ -685,7 +687,7 @@ label:
case 'A':
case 'a':
- for (i = 0; i < asizeof(Locale->weekday); i++) {
+ for (i = 0; i < (int)asizeof(Locale->weekday); i++) {
if (c == 'A') {
len = strlen(Locale->weekday[i]);
if (strncasecmp(buf,
@@ -779,7 +781,7 @@ label:
case 'B':
case 'b':
case 'h':
- for (i = 0; i < asizeof(Locale->month); i++) {
+ for (i = 0; i < (int)asizeof(Locale->month); i++) {
if (Oalternative) {
if (c == 'B') {
len = strlen(Locale->alt_month[i]);
@@ -1056,7 +1058,7 @@ _strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1
** If there is a better way to make it portable, go ahead by
** all means.
*/
- if ((len > 0 && len < sizeof(tmpbuf)) || (len == 0 && *fmt == '\0'))
+ if ((len > 0 && len < (int)sizeof(tmpbuf)) || (len == 0 && *fmt == '\0'))
ST(0) = sv_2mortal(newSVpv(tmpbuf, len));
else {
/* Possibly buf overflowed - try again with a bigger buf */
--
2.1.2