([NSCalendarDate -descriptionWithCalendarFormat:locale:]): Remove

unused variables MS and DS.  Avoid warning by not trying to sprintf()
a zero-length string.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1911 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-10-31 20:05:02 +00:00
parent e73b241f82
commit 40ab288276

View file

@ -524,7 +524,6 @@
const char *f = [format cString];
int lf = strlen(f);
BOOL mtag = NO, dtag = NO, ycent = NO;
char ms[80] = "", ds[80] = "";
int yd = 0, md = 0, dd = 0, hd = 0, mnd = 0, sd = 0;
int i, j, k;
@ -592,8 +591,12 @@
case 'm':
++i;
if (mtag)
// +++ Translate to locale character string
k = sprintf(&(buf[j]), "");
{
// +++ Translate to locale character string
/* was: k = sprintf(&(buf[j]), ""); */
buf[j] = '\0';
k = 0;
}
else
k = sprintf(&(buf[j]), "%02d", md);
j += k;
@ -608,8 +611,12 @@
case 'w':
++i;
if (dtag)
// +++ Translate to locale character string
k = sprintf(&(buf[j]), "");
{
// +++ Translate to locale character string
/* Was: k = sprintf(&(buf[j]), ""); */
buf[j] = '\0';
k = 0;
}
else
k = sprintf(&(buf[j]), "%02d", dd);
j += k;