summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-04 23:13:18 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-04 23:13:18 +0900
commit5bb80b76b093130be14161bb0c8d05f6fea749f3 (patch)
tree938e973e04144fc4bbadd8be7abc95d269309e3d
parent364526cd70764e3f8f9137d7782ae36d5d8fe448 (diff)
[win32] suppress false warning by mingw gcc
-rw-r--r--vsnprintf.c2
-rw-r--r--win32/win32.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/vsnprintf.c b/vsnprintf.c
index 889c409254..3efef20cd8 100644
--- a/vsnprintf.c
+++ b/vsnprintf.c
@@ -561,7 +561,7 @@ BSD_vfprintf(FILE *fp, const char *fmt0, va_list ap)
int fprec = 0; /* floating point precision */
char expstr[7]; /* buffer for exponent string */
#endif
- u_long MAYBE_UNUSED(ulval); /* integer arguments %[diouxX] */
+ u_long MAYBE_UNUSED(ulval) = 0; /* integer arguments %[diouxX] */
#ifdef _HAVE_SANE_QUAD_
u_quad_t MAYBE_UNUSED(uqval); /* %q integers */
#endif /* _HAVE_SANE_QUAD_ */
diff --git a/win32/win32.c b/win32/win32.c
index 0fa3855fb3..b64540e4ae 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -5271,7 +5271,7 @@ static int
wrename(const WCHAR *oldpath, const WCHAR *newpath)
{
int res = 0;
- DWORD oldatts, newatts = (DWORD)-1;
+ DWORD oldatts = 0, newatts = (DWORD)-1;
DWORD oldvsn = 0, newvsn = 0, e;
e = get_attr_vsn(oldpath, &oldatts, &oldvsn);