([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:
mccallum 1996-10-31 20:05:02 +00:00
parent 0eca046ad3
commit f5d9592554

View file

@ -524,7 +524,6 @@
const char *f = [format cString]; const char *f = [format cString];
int lf = strlen(f); int lf = strlen(f);
BOOL mtag = NO, dtag = NO, ycent = NO; 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 yd = 0, md = 0, dd = 0, hd = 0, mnd = 0, sd = 0;
int i, j, k; int i, j, k;
@ -592,8 +591,12 @@
case 'm': case 'm':
++i; ++i;
if (mtag) 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 else
k = sprintf(&(buf[j]), "%02d", md); k = sprintf(&(buf[j]), "%02d", md);
j += k; j += k;
@ -608,8 +611,12 @@
case 'w': case 'w':
++i; ++i;
if (dtag) 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 else
k = sprintf(&(buf[j]), "%02d", dd); k = sprintf(&(buf[j]), "%02d", dd);
j += k; j += k;