mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
([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:
parent
0eca046ad3
commit
f5d9592554
1 changed files with 12 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue