bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

glibc-2.2.4 strftime warning


From: Lapshin, Kirill
Subject: glibc-2.2.4 strftime warning
Date: Tue, 8 Jan 2002 18:13:02 -0500

Dear sir/madam,

While compiling  glibc version 2.2.4 I got nasty looking warning in file
time/strftime.c line 963.

strftime.c(963) : warning C4146: unary minus operator applied to unsigned
type, result still unsigned

I looked in the code and it looks to me like something really wrong in
there. Here is the code:

          {
            unsigned int u = number_value;

            bufp = buf + sizeof (buf) / sizeof (buf[0]);
            negative_number = number_value < 0;

            if (negative_number)
              u = -u;   //got warning here

            do
              *--bufp = u % 10 + L_('0');
            while ((u /= 10) != 0);
          }

Though I don't have any problems with the time routines, I anticipate such a
possibility. Could you please clarify this situation?

Best regards,
Kirill Lapshin.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]