bug-gplusplus
[Top][All Lists]
Advanced

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

Re: need warning number's list !!!! URGENT !!!!!!!!!


From: Artak Avetyan
Subject: Re: need warning number's list !!!! URGENT !!!!!!!!!
Date: Thu, 25 Jan 2001 16:47:24 +0300

Hello Günter

Thanks a lot.

OK, lets' consider this as a error, I'll fix it for sure.
But if I include STL files in my project (not only in my - many people had
such a problem), it starts to bring warnings, such as signed/unsigned
components comparing, etc., which is part of codes of STL.
In any case, I'd like to find the way how to dynamicaly switch on/off
warnings. I'm trying to find manual how to do this, but unsuccessful.
Any one knows how to do this ?
Maybe this included in standard Linux Documentation, but I do not know where.
Please, if someone knows where to find, inform me.

Thanks again.
With regards,
Artak.


Günter Neiß wrote:

> Artak Avetyan schrieb:
>
> > I need the list of warnings. Need to disable some warnings. How can I
> > find info. In my project I already have about 50 stupid warnings,  which
> > is not connected with my codes (they come from Standard Header Files),
> > it disturbs me when I look for errors.
> > For example in a sample :
> >
> > #include <stdio.h>
> > int main(int argc, char *argv[])
> > {
> >  char szBuffer[256];
> >  long num = 10;
> >  sprintf(szBuffer, "the Number is %d.\n", num);
> >  fwrite(szBuffer, 1, (long)strlen(szBuffer), stdout);
> >  return 0;
> > }
> >
> > I receive following messages:
> >
> > c++ -DHAVE_CONFIG_H -I. -I. -I..     -O0 -g3 -Wall -c main.cpp
> > main.cpp: In function `int main(int, char **)':
> > main.cpp:32: warning: int format, long int arg (arg 3)
> > *** success ***
>
> Don't try to disable it !
> Fix it ! (Because it's realy an error in this case! )
>
> Your line should look:
> sprintf(szBuffer, "the Number is %ld.\n", num);
>                                   ~
>
> If Your format was a little bit more complex You will get some serious
> results otherwise
>
> GÝnter




reply via email to

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