From c6c7267c5466e59289e84db8629fae17ddfab287 Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Sun, 13 Mar 2011 17:09:55 +0800 Subject: [PATCH] 6990848: JGSS/windows security code native code compiler warnings Reviewed-by: valeriep --- .../windows/native/sun/security/krb5/NativeCreds.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jdk/src/windows/native/sun/security/krb5/NativeCreds.c b/jdk/src/windows/native/sun/security/krb5/NativeCreds.c index 7533cc12811..91ed2cb84bb 100644 --- a/jdk/src/windows/native/sun/security/krb5/NativeCreds.c +++ b/jdk/src/windows/native/sun/security/krb5/NativeCreds.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1032,12 +1032,12 @@ jobject BuildKerberosTime(JNIEnv *env, PLARGE_INTEGER kerbtime) { // XXX Cannot use %02.2ld, because the leading 0 is ignored for integers. // So, print them to strings, and then print them to the master string with a // format pattern that makes it two digits and prefix with a 0 if necessary. - swprintf( (wchar_t *)month, L"%2.2d", systemTime.wMonth); - swprintf( (wchar_t *)day, L"%2.2d", systemTime.wDay); - swprintf( (wchar_t *)hour, L"%2.2d", systemTime.wHour); - swprintf( (wchar_t *)minute, L"%2.2d", systemTime.wMinute); - swprintf( (wchar_t *)second, L"%2.2d", systemTime.wSecond); - swprintf( (wchar_t *)timeString, + swprintf( (wchar_t *)month, 3, L"%2.2d", systemTime.wMonth); + swprintf( (wchar_t *)day, 3, L"%2.2d", systemTime.wDay); + swprintf( (wchar_t *)hour, 3, L"%2.2d", systemTime.wHour); + swprintf( (wchar_t *)minute, 3, L"%2.2d", systemTime.wMinute); + swprintf( (wchar_t *)second, 3, L"%2.2d", systemTime.wSecond); + swprintf( (wchar_t *)timeString, 16, L"%ld%02.2s%02.2s%02.2s%02.2s%02.2sZ", systemTime.wYear, month,