f



Getting rid of warnings

Hello all,
I usually try to get my code clean enough so that no warnings remain at 
compile time. So I'm annoyed by the 2 following warnings which I can't get 
rid of. Suggestions (in the form of code rewrite or #pragma) are welcome.

Exemple 1:
#define MAX_TRACES 100
int NbTraces=0;	// Set somewhere else in the program

void F(void) { 
int i, Idx[MAX_TRACES];
for (j=0; j<MAX_TRACES; j++) Idx[j]=0;	// Doesn't change anything
for (j=0; j<MAX_TRACES;  j++) GetSomething(&Idx[j]);
for (j=0; j<NbTraces; j++) i = Idx[j];
}

The last line gives me:
Warning: Local 'Idx' might not have been fully initialized.
Obviously NbTraces<MAX_TRACES and anyway I fill up the Idx array with 0, so 
what is it complaining about ?


Example 2:
#define ADD(Frmt) { \
if (NULL==strchr(Frmt, '%')) sprintf(DimName, "%s/" Frmt, Server.Name);\
else                         sprintf(DimName, "%s/" Frmt, Server.Name, 
Port);

ADD("Something");
ADD("SomePort%d");

The first add gives me:
DimPpcServer.c:1126: warning: too many arguments for format
And the 2nd one:
DimPpcServer.c:1130: warning: too few arguments for format
I understand the reason (the expansion of "%s/Something" on the 2nd line of 
the macro has an extra argument).

Thanks
-- 
Guillaume Dargaud
http://www.gdargaud.net/
0
3/5/2012 9:33:54 AM
comp.lang.c 30657 articles. 4 followers. spinoza1111 (3246) is leader. Post Follow

11 Replies
479 Views

Similar Articles

[PageSpeed] 29

On 2012-03-05, Guillaume Dargaud <use_the_contact_form@www.gdargaud.net> wrote:
> Hello all,
> I usually try to get my code clean enough so that no warnings remain at 
> compile time. So I'm annoyed by the 2 following warnings which I can't get 
> rid of. Suggestions (in the form of code rewrite or #pragma) are welcome.
>
> Exemple 1:
> #define MAX_TRACES 100
> int NbTraces=0;	// Set somewhere else in the program
>
> void F(void) { 
> int i, Idx[MAX_TRACES];
> for (j=0; j<MAX_TRACES; j++) Idx[j]=0;	// Doesn't change anything

Does it help if you replace the two lines above by

  int i, Idx[MAX_TRACES] = {0};

> for (j=0; j<MAX_TRACES;  j++) GetSomething(&Idx[j]);
> for (j=0; j<NbTraces; j++) i = Idx[j];
> }
>
> The last line gives me:
> Warning: Local 'Idx' might not have been fully initialized.
> Obviously NbTraces<MAX_TRACES and anyway I fill up the Idx array with 0, so 
> what is it complaining about ?
>
>
> Example 2:
> #define ADD(Frmt) { \
> if (NULL==strchr(Frmt, '%')) sprintf(DimName, "%s/" Frmt, Server.Name);\
> else                         sprintf(DimName, "%s/" Frmt, Server.Name, 
> Port);
>
> ADD("Something");
> ADD("SomePort%d");
>
> The first add gives me:
> DimPpcServer.c:1126: warning: too many arguments for format
> And the 2nd one:
> DimPpcServer.c:1130: warning: too few arguments for format
> I understand the reason (the expansion of "%s/Something" on the 2nd line of 
> the macro has an extra argument).

This is ugly, but it will probably work:

  #define ADD0(Frmt) sprintf(DimName, "%s/" Frmt, Server.Name);
  #define ADD1(Frmt) sprintf(DimName, "%s/" Frmt, Server.Name, Port);

  ADD0("Something");
  ADD1("SomePort%d");
0
ike7 (214)
3/5/2012 11:16:47 AM
On Mar 5, 3:33=A0am, Guillaume Dargaud
<use_the_contact_f...@www.gdargaud.net> wrote:
> Hello all,
> I usually try to get my code clean enough so that no warnings remain at
> compile time. So I'm annoyed by the 2 following warnings which I can't ge=
t
> rid of. Suggestions (in the form of code rewrite or #pragma) are welcome.
>
> Exemple 1:
> #define MAX_TRACES 100
> int NbTraces=3D0; // Set somewhere else in the program
>
> void F(void) {
> int i, Idx[MAX_TRACES];
> for (j=3D0; j<MAX_TRACES; j++) Idx[j]=3D0; =A0 =A0 =A0 // Doesn't change =
anything
> for (j=3D0; j<MAX_TRACES; =A0j++) GetSomething(&Idx[j]);
> for (j=3D0; j<NbTraces; j++) i =3D Idx[j];
>
> }
>
> The last line gives me:
> Warning: Local 'Idx' might not have been fully initialized.
> Obviously NbTraces<MAX_TRACES and anyway I fill up the Idx array with 0, =
so
> what is it complaining about ?

There are times when the compiler is required to issue a diagnostic.
Unfortunately, there is no restriction against extraneous or
superfluous diagnostics, such as this.  Many systems have options that
allow you to supress undesired diagnostics.  The documentation for
your system should tell you if it has that option and how to invoke
it.

>
> Example 2:
> #define ADD(Frmt) { \
> if (NULL=3D=3Dstrchr(Frmt, '%')) sprintf(DimName, "%s/" Frmt, Server.Name=
);\
> else =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 sprintf(DimName, "%s=
/" Frmt, Server.Name,
> Port);
>
> ADD("Something");
> ADD("SomePort%d");
>
> The first add gives me:
> DimPpcServer.c:1126: warning: too many arguments for format

After substituion, your format string has only ONE conversion
specifier while there are TWO arguments to be formatted in the in the
second call to sprintf.  While not a problem from a language
perspective, this diagnostic is not unreasonable.  See previous
comment about possibly supressing it.

> And the 2nd one:
> DimPpcServer.c:1130: warning: too few arguments for format

After substition, your format string has TWO conversion specifiers BUT
the first call to sprintf has only ONE argument to be converted.  This
is a serious programming error which immediately invokes undefined
behavior.  While the compiler is not required to diagnose this
situation, you should consider yourself fortunate that it did.

> I understand the reason (the expansion of "%s/Something" on the 2nd line =
of
> the macro has an extra argument).

Apparently your understanding is incomplete.

0
schwarz45 (78)
3/5/2012 9:22:18 PM
On 05.03.2012 10:33, Guillaume Dargaud wrote:
> Hello all,
> I usually try to get my code clean enough so that no warnings remain at 
> compile time. So I'm annoyed by the 2 following warnings which I can't get 
> rid of. Suggestions (in the form of code rewrite or #pragma) are welcome.
> 
> Exemple 1:
> #define MAX_TRACES 100
> int NbTraces=0;	// Set somewhere else in the program
> 
> void F(void) { 
> int i, Idx[MAX_TRACES];
> for (j=0; j<MAX_TRACES; j++) Idx[j]=0;	// Doesn't change anything
> for (j=0; j<MAX_TRACES;  j++) GetSomething(&Idx[j]);
> for (j=0; j<NbTraces; j++) i = Idx[j];
> }
> 
> The last line gives me:
> Warning: Local 'Idx' might not have been fully initialized.
> Obviously NbTraces<MAX_TRACES and anyway I fill up the Idx array with 0, so 
> what is it complaining about ?
> 

Well, /you/ know that NbTraces will never exceed MAX_TRACES, but the
compiler doesn't. Perhaps you should insert an

assert(NbTraces < MAX_TRACES);

before the loops.

And, by the way, why don't you just replace that last line with

i = Idx[NbTraces - 1];

> 
> Example 2:
> #define ADD(Frmt) { \
> if (NULL==strchr(Frmt, '%')) sprintf(DimName, "%s/" Frmt, Server.Name);\
> else                         sprintf(DimName, "%s/" Frmt, Server.Name, 
> Port);
> 
> ADD("Something");
> ADD("SomePort%d");
> 
> The first add gives me:
> DimPpcServer.c:1126: warning: too many arguments for format
> And the 2nd one:
> DimPpcServer.c:1130: warning: too few arguments for format
> I understand the reason (the expansion of "%s/Something" on the 2nd line of 
> the macro has an extra argument).
> 
> Thanks

Perhaps it would be better to replace that very kludgy macro with a
function like

#ifdef __GNUC__
__attribute__((format(printf, 1, 2)))
#endif
int add(const char* fmt, ...)
{
    size_t l = strlen(Server.Name);
    va_args ap;
    int r;
    va_start(ap, fmt);
    memcpy(DimName, Server.Name, l);
    DimName[l] = '/';
    r = vsprintf(DimName + l + 1, fmt, ap);
    va_end(ap);
    return r;
}

The first three lines give you format string parameter checking on GCC
(I don't know how to do that on other compilers) for this function.

However, you should really apply some length checking here, the code is
vulnerable to buffer overflows on DimName.

If your toolchain supports the C99 inline keyword, you can define this
function in a header file as inline. You should then add another source
file to your project, containing just the inclusion of the header file
with this function and

extern int add(const char* fmt, ...);

That should be just as efficient as a macro expansion and safer than
that (you know, side-effect wise).

HTH,
Markus
0
nullplan (53)
3/6/2012 8:12:23 AM
Markus Wichmann wrote:

> And, by the way, why don't you just replace that last line with
> i = Idx[NbTraces - 1];

Actually the loop does other things which I left out.


Ike Naar wrote:

> Does it help if you replace the two lines above by
>   int i, Idx[MAX_TRACES] = {0};

Yes it does go away and I'm surprised ! I thought I would have to set 
{0,0,...} but since I didn't know the value of MAX_TRACES, that wasn't 
possible.
Does this syntax means that only the 1st element is set to 0 or all of them?

>   #define ADD0(Frmt) sprintf(DimName, "%s/" Frmt, Server.Name);
>   #define ADD1(Frmt) sprintf(DimName, "%s/" Frmt, Server.Name, Port);

Yeah, I guess it's probably the simplest solution. here I simplified those 
macros which are a lot more complex and can't actually be easily replaced by 
functions (lots of ## and # expansions which I left out).
-- 
Guillaume Dargaud
http://www.gdargaud.net/
0
3/6/2012 12:44:12 PM
Am 03/06/2012 01:44 PM, schrieb Guillaume Dargaud:
> Markus Wichmann wrote:
> 
>> And, by the way, why don't you just replace that last line with
>> i = Idx[NbTraces - 1];
> 
> Actually the loop does other things which I left out.
> 
> 
> Ike Naar wrote:
> 
>> Does it help if you replace the two lines above by
>>   int i, Idx[MAX_TRACES] = {0};
> 
> Yes it does go away and I'm surprised ! I thought I would have to set 
> {0,0,...} but since I didn't know the value of MAX_TRACES, that wasn't 
> possible.
> Does this syntax means that only the 1st element is set to 0 or all of them?

No, all elements that are not explicitly mentioned in an initializer are
always initialized by 0

In fact the above initializer { 0 } works for any type of array (and
other variable) as long as MAX_TRACES is a compile time integer constant.

Jens
0
3/6/2012 1:02:46 PM
On 03/06/2012 07:44 AM, Guillaume Dargaud wrote:
> Markus Wichmann wrote:
....
>> Does it help if you replace the two lines above by
>>   int i, Idx[MAX_TRACES] = {0};
> 
> Yes it does go away and I'm surprised ! I thought I would have to set 
> {0,0,...} but since I didn't know the value of MAX_TRACES, that wasn't 
> possible.
> Does this syntax means that only the 1st element is set to 0 or all of them?

It happens to set all of them to 0, but for two different reasons. It's
easier to explain those two reasons if I change it a bit:

int Idx[MAX_TRACES] = {1};

That code explicitly sets Idx[0] to 1. However, because an explicit
initializer for par of the array has been provided, all of the elements
other than the one specified get implicitly zero-initialized. The same
rule applies to structures - if an incomplete initializer is provided,
the members not explicitly initialized are implicitly zero-initialized.
-- 
James Kuyper
0
jameskuyper (5635)
3/6/2012 1:04:42 PM
On 3/6/2012 7:44 AM, Guillaume Dargaud wrote:
> [...]
> Actually the loop does other things which I left out.

     In other words, the warning was not for the code you posted,
but for some other code we can only guess at.  Oh, joy.

> [...]
> here I simplified those
> macros which are a lot more complex and can't actually be easily replaced by
> functions (lots of ## and # expansions which I left out).

     The problem with the macro as posted is clear (of course, it
may be unrelated to the actual program).  After expansion of
`ADD("Something")' you have

	if (NULL==strchr("Something", '%'))
	    sprintf(DimName, "%s/Something", Server.Name);
	else
	    sprintf(DimName, "%s/Something", Server.Name, Port);

After expanding `ADD("SomePort/%d")' you have

	if (NULL==strchr("SomePort/%d", '%'))
	    sprintf(DimName, "%s/SomePort/%d", Server.Name);
	else
	    sprintf(DimName, "%s/SomePort/%d", Server.Name, Port);

In each case, one of the two sprintf() calls draws a warning,
and the warning makes sense because the format does not match the
arguments.  You happen to know that the incorrect call will not
execute, but the compiler does not: It has not evaluated strchr()
and performed the NULL comparison during compilation, but has left
them for run-time.

     Since you haven't shown actual code I can't suggest a way
to improve matters, except for the generic "Don't Do That."

-- 
Eric Sosman
esosman@ieee-dot-org.invalid
0
esosman2 (3096)
3/6/2012 1:27:10 PM
Jens Gustedt <jens.gustedt@loria.fr> writes:

> Am 03/06/2012 01:44 PM, schrieb Guillaume Dargaud:
<sni>
>>> Does it help if you replace the two lines above by
>>>   int i, Idx[MAX_TRACES] = {0};
>> 
>> Yes it does go away and I'm surprised ! I thought I would have to set 
>> {0,0,...} but since I didn't know the value of MAX_TRACES, that wasn't 
>> possible.
>> Does this syntax means that only the 1st element is set to 0 or all of them?
<snip>
> In fact the above initializer { 0 } works for any type of array (and
> other variable) as long as MAX_TRACES is a compile time integer
> constant.

I think it works for variably modified array types as well.  In other
word, MAX_TRACES could be (or could expand to) an expression that is not
a compile-time constant.

-- 
Ben.
0
ben.usenet (6790)
3/6/2012 5:17:59 PM
Am 03/06/2012 06:17 PM, schrieb Ben Bacarisse:
> Jens Gustedt <jens.gustedt@loria.fr> writes:
>> In fact the above initializer { 0 } works for any type of array (and
>> other variable) as long as MAX_TRACES is a compile time integer
>> constant.
> 
> I think it works for variably modified array types as well.  In other
> word, MAX_TRACES could be (or could expand to) an expression that is not
> a compile-time constant.

No, for VLA initializers are not allowed, unfortunately.

Jens


0
3/6/2012 9:43:05 PM
Jens Gustedt <jens.gustedt@loria.fr> writes:

> Am 03/06/2012 06:17 PM, schrieb Ben Bacarisse:
>> Jens Gustedt <jens.gustedt@loria.fr> writes:
>>> In fact the above initializer { 0 } works for any type of array (and
>>> other variable) as long as MAX_TRACES is a compile time integer
>>> constant.
>> 
>> I think it works for variably modified array types as well.  In other
>> word, MAX_TRACES could be (or could expand to) an expression that is not
>> a compile-time constant.
>
> No, for VLA initializers are not allowed, unfortunately.

Ah, yes, so I see (now).  Thanks for that.

-- 
Ben.
0
ben.usenet (6790)
3/6/2012 10:49:14 PM
> int Idx[MAX_TRACES] = {1};
> 
> That code explicitly sets Idx[0] to 1. However, because an explicit
> initializer for par of the array has been provided, all of the elements
> other than the one specified get implicitly zero-initialized. The same
> rule applies to structures - if an incomplete initializer is provided,
> the members not explicitly initialized are implicitly zero-initialized.

That's new to me.
Thanks.
-- 
Guillaume Dargaud
http://www.gdargaud.net/
0
3/13/2012 9:59:00 AM
Reply:

Similar Artilces:

How do I get rid of this warning?
Patterned after the solution suggested in the perlmodlib man page, I wrote the following code: ==================== This is file b.pm #!/usr/local/bin/perl -w use strict; package b; sub f { print "BBBBBBBB @_\n"; } eval join('', <main::DATA>) || die $@ unless caller(); 1 __END__ package main; b::f(@ARGV); ================================= When called this from the command line, say: b.pm X it works fine. But when I use it as a module, say from this context: ===================== This is file p.pl #!/usr/local/bin/perl -w use strict; use b; b::f('X'); ====...

How to get rid of warnings?
I have the maximum number of warnings during PHP development. How can I get rid of these warnings without turning them off in PHP? Here's the code I have: <form method="POST" action="eat.php"> <select name="lunch[ ]" multiple> <option value="pork">BBQ Pork Bun</option> <option value="chicken">Chicken Bun</option> <option value="lotus">Lotus Seed Bun</option> <option value="bean">Bean Paste Bun</option> <option value="nest">Bird-Nest Bun</option> </select> <input type="submit" name="submit"> </form> Selected buns: <br/> <?php foreach ($_POST['lunch'] as $choice) { print "You want a $choice bun. <br/>"; } ?> And I get: Warning: Invalid argument supplied for foreach() in C:\lighttpd\htdocs\index.php on line 17 Is there a way to give the 'lunch' variable a default value if undefined? Thank you. Lenard Redwood wrote: > I have the maximum number of warnings during PHP development. How can I > get rid of these warnings without turning them off in PHP? > > Here's the code I have: > > <form method="POST" action="eat.php"> > <select name="lunch[ ]" multiple> > <option value="pork">BBQ Pork Bun</option> > <option value="chicken">...

How to get rid of obsolete function warning
Hi all, Since I'm using randint function I receive: Warning: This is an obsolete function and may be removed in the future. Please use RANDI instead. To disable this warning, type warning('off','comm:obsolete:randint'); but everytime I startup MATLAB I have to do "warning('off','comm:obsolete:randint');" How can I get rid of that warning permanently? Elnaz "Elnaz " <ebsadeghian@gmail.com> wrote in message <kjvlb2$6op$1@newscl01ah.mathworks.com>... > Hi all, > Since I'm using randint function I receive: > Warning: This is an obsolete function and may be removed in the > future. > Please use RANDI instead. > To disable this warning, type > warning('off','comm:obsolete:randint'); > but everytime I startup MATLAB I have to do "warning('off','comm:obsolete:randint');" > How can I get rid of that warning permanently? > > Elnaz Why not just switch to randi? It won't be long before randint does disappear, and then you will need to do so anyway. John On 4/8/2013 6:54 PM, Elnaz wrote: > Hi all, > Since I'm using randint function I receive: > Warning: This is an obsolete function and may be removed in the > future. > Please use RANDI instead. > To disable this warning, type > warning('off','comm:obsolete:r...

Get rid of unused parameter warning?
I have an abstract base class which defines an interface to a function which takes 3 arguments. From that ABC I define a set of derived classes which implements the base class' interface. The thing is, some derived classes don't use some of the parameters, which causes the compiler to throw warnings. As I'm not using those parameters intentionally, those warnings tend to be a bit annoying. So, does anyone happen to know a good standard way to get the compiler to stop warning about those specific instances where a parameter isn't used? Thanks in advance, Rui Maciel On Sep 25, 3:08=A0pm, Rui Maciel <rui.mac...@gmail.com> wrote: > I have an abstract base class which defines an interface to a function wh= ich takes 3 arguments. =A0 > From that ABC I define a set of derived classes which implements the base= class' interface. =A0The > thing is, some derived classes don't use some of the parameters, which ca= uses the compiler to throw > warnings. =A0As I'm not using those parameters intentionally, those warni= ngs tend to be a bit > annoying. > > So, does anyone happen to know a good standard way to get the compiler to= stop warning about those > specific instances where a parameter isn't used? One way is not to name the parameters, give only type: int foo( int ) { return 0; } For me it is fine. The downside that some claim it not documenting the intention well ...

how to get rid of warnings from required fields?
Hi, I made a form based on one table that has several required fields. If in the form, I leave some of them blank and close the form using 'X', I get 2 warning messages, 1st is "... field is required." 2nd is "if you close, the data will be lost." How can I get rid of these or, if possible, I would like to replace them with my own. I tried Form Close event, doesn't work. Anyone could help me here? Thanks in advance. ming On 13 May 2006 15:42:39 -0700, swingingming wrote: > Hi, I made a form based on one table that has several required fields. > If in the form, I leave some of them blank and close the form using > 'X', I get 2 warning messages, 1st is "... field is required." 2nd is > "if you close, the data will be lost." > How can I get rid of these or, if possible, I would like to replace > them with my own. I tried Form Close event, doesn't work. > Anyone could help me here? Thanks in advance. > ming Here's how you can find the correct error and show your own message for any of the form level errors. First code the Form's Error event: MsgBox "Error#: " & DataErr ' Display the error number Response = acDataErrDisplay ' Display Default message Then open the form and intentionally make that error. The message box will display the error number and the default error message. Next, go back to the error event and change that code to: If DataErr = XXXX...

How do you get rid of dynamic linker warning
I have just ported a large application suite to sco 5.0.7. The application suite runs fine. It's passed our many regression test. The only annoyance is when we run a program, we get the "warning": dynamic linker: prog123: warning: copy relocation size mismatch for symbol Xpcs_work_int How do you stop the dynamic linker telling me this every time I run a program? Surely there is an environment variable to tell it "I'm not interested, I know there is a coding problem, I don't want to fix it, stop telling me this." I'm using the same code on AIX, HPUX, Linu...

incompatible warning in C/C++
incompatible warning in C/C++ I am using MS Visual C/C++ 6.0. I get the following warning when compiling C:model.ex.c(1221) : warning C4133: '=' : incompatible types - from 'struct s_lsp_def *' to 'struct s_lsp_def *' In the .h file, I have ====================== typedef struct s_lsp_def; typedef struct { int lsp_id; int priority; struct s_lsp_def* ptr_next_lsp_def; }s_lsp_def; in a .c file, model.ex.c, I have ================================ int bcModel_add_lspToList ( s_lsp_def* the_ptr_lsp_def, { s_lsp_def* curr_ptr_lsp_def; // the follow...

XPATH
Hello, I have an Xpath expression: //foo[translate(text(),"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")="'bla'"] Here i check if i can find bla in a foo tag - and its case insensitive. If i use this expression I get warnings (failures?): Unrecognized escape \Q passed through at (eval 4) line 1. Unrecognized escape \E passed through at (eval 4) line 1. Unrecognized escape \Q passed through at (eval 4) line 1. Unrecognized escape \E passed through at (eval 4) line 1. and I dont know what they mean? if i check without the case sensitive tes...

How to get rid of warning message from proc dataset
Hey, guys, I submitted the followin codes, and get warning message as "Warning: No matching members in directory". I cheked some papers, SAS gave such message when library is not specified. But in my case, the library is defined. And the warning still exists the second time I run the code. Does any one know how to get rid of the warning? (note: try is a sas dataset) . Many thanks. libname temp 'C:\Documents and Settings\Desktop\test'; libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; proc datasets; copy in=temp out=t2path; select try; quit; Mindy ...

Can I get rid of C libraries dependencies?
Okey, so I wrote this code: pragma No_Run_Time; with Interfaces.C.Strings; use Interfaces.C.Strings; with Interfaces.C; use Interfaces.C; procedure Main is procedure cputs(str:Char_Array); pragma Import(C, cputs, "puts"); procedure cexit(code:Integer); pragma Import(C, cexit, "exit"); begin cputs("Hello World!"); cexit(0); end Main; What I want to achive is a tiny 2kb binary executable with a single function called as entry point (which is defined in Ada and called Main procedure). The pragma on top let me get ...

How to get rid of warning message from proc dataset #2
Hey, guys, I submitted the followin codes, and get warning message as "Warning: No matching members in directory". I cheked some papers, SAS gave such message when library is not specified. But in my case, the library is defined. And the warning still exists the second time I run the code. Does any one know how to get rid of the warning? (note: try is a sas dataset) . Many thanks. libname temp 'C:\Documents and Settings\Desktop\test'; libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; proc datasets; copy in=temp out=t2path; select try; quit; Mindy ...

How can I get rid of #define in my generated C code ...?
Folk, I am using lex and yacc for a project I am working on, wondering if there is any switch I can specify ANYWHERE, including the C compiler, that would take the .c files that these utilities generate, and get rid of all the #defines in the generated code. (when I say get rid of, I don't mean to simply delete, I mean to recognize: Oh yes, this is defined and here is what I want to do.) The y.tab.c and lex.yy.c files that these utilities produce are infested with #define, a lot conditional, making them impossible to read, and modify (e.g. yes, I need to make some changes to them) Any s...

Re: How to get rid of warning message from proc dataset
Mindy, Do you still get the warning if you use double quotes {") rather than single quotes (') in the libname statements? Art ------ On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_sas@YAHOO.COM> wrote: >Hey, guys, > >I submitted the followin codes, and get warning message as "Warning: >No matching members in directory". I cheked some papers, SAS gave such >message when library is not specified. But in my case, the library is >defined. >And the warning still exists the second time I run the code. Does any >one know how to get rid of the warning? (note: try is a sas dataset) . >Many thanks. > >libname temp 'C:\Documents and Settings\Desktop\test'; >libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; > >proc datasets; > copy in=temp out=t2path; > select try; >quit; >Mindy On Oct 1, 11:32 am, art...@NETSCAPE.NET (Arthur Tabachneck) wrote: > Mindy, > > Do you still get the warning if you use double quotes {") rather than > single quotes (') in the libname statements? > > Art > ------ > > > > On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_...@YAHOO.COM> wrote: > >Hey, guys, > > >I submitted the followin codes, and get warning message as "Warning: > >No matching members in directory". I cheked some papers, SAS gave such > >message when library is not specified. But in my case, ...

[fourier] getting rid of irritating font-encoding-changes warnings
When using the `fourier' package, one gets the warnings (harmless, they tell me) about font-encoding changes following at the end of my post. How can I get LaTeX not to mention them anymore? They take up valuable screen real-estate in the "Log & Messages"-window of my editor (Kile). TIA, Erik The warnings I spoke of: /usr/share/texmf/tex/latex/fourier/fourier.sty:50: Encoding `OT1' has changed to `T1' for symbol font(Font) `operators' in the math version `normal' on input line 50. Encoding `OT1' has changed to `T1' for symbol font(Font) `operators' in the math version `normal' /usr/share/texmf/tex/latex/fourier/fourier.sty:50: Encoding `OT1' has changed to `T1' for symbol font(Font) `operators' in the math version `bold' on input line 50. Encoding `OT1' has changed to `T1' for symbol font(Font) `operators' in the math version `bold' /usr/share/texmf/tex/latex/fourier/fourier.sty:59: Encoding `OML' has changed to `FML' for symbol font(Font) `letters' in the math version `normal' on input line 59. Encoding `OML' has changed to `FML' for symbol font(Font) `letters' in the math version `normal' /usr/share/texmf/tex/latex/fourier/fourier.sty:59: Encoding `OML' has changed to `FML' for symbol font(Font) `letters' in the math version `bold' on input line 59. Encoding `OML' has changed to `FML' for symbol font(Font) `letters...

Re: How to get rid of warning message from proc dataset #3
On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_sas@YAHOO.COM> wrote: >Hey, guys, > >I submitted the followin codes, and get warning message as "Warning: >No matching members in directory". I cheked some papers, SAS gave such >message when library is not specified. But in my case, the library is >defined. >And the warning still exists the second time I run the code. Does any >one know how to get rid of the warning? (note: try is a sas dataset) . >Many thanks. > >libname temp 'C:\Documents and Settings\Desktop\test'; >libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; > >proc datasets; > copy in=temp out=t2path; > select try; >quit; >Mindy Try removing IN=TEMP from the COPY statement and instead code LIBRARY=TEMP in the PROC statement. It actually seems to work either way, but using 9.1.3 I do see that spurious warning. libname temp 'c:\temp\a'; libname t2path 'c:\temp\aa'; data temp.try; run; proc datasets; copy in=temp out=t2path; select try; quit; proc datasets library=temp; copy out=t2path; select try; quit; ...

Re: How to get rid of warning message from proc dataset #2
Mindy, Your code works, on my system, as originally written. Thus, two more questions: (1) does try exist in libname temp? and (2) is try a SAS dataset of the same version as the version of SAS you a running? Art ------- On Mon, 1 Oct 2007 20:43:44 -0000, Mindy <master2005_sas@YAHOO.COM> wrote: >On Oct 1, 11:32 am, art...@NETSCAPE.NET (Arthur Tabachneck) wrote: >> Mindy, >> >> Do you still get the warning if you use double quotes {") rather than >> single quotes (') in the libname statements? >> >> Art >> ------ >> >> >> >> On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_...@YAHOO.COM> wrote: >> >Hey, guys, >> >> >I submitted the followin codes, and get warning message as "Warning: >> >No matching members in directory". I cheked some papers, SAS gave such >> >message when library is not specified. But in my case, the library is >> >defined. >> >And the warning still exists the second time I run the code. Does any >> >one know how to get rid of the warning? (note: try is a sas dataset) . >> >Many thanks. >> >> >libname temp 'C:\Documents and Settings\Desktop\test'; >> >libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; >> >> >proc datasets; >> > copy in=temp out=t2path; >> > select try; >> >quit; &g...

Better C/C++ Than C/C++?
I am looking for a good systems programming language that can be used instead of C/C++. My qualifications for the language are: * mature compiler(s) that produce native-code binaries (for Windows) * open source - preferable, but not 100% necessary Thanks, Kevin "Kevin Albrecht" <kevin@albrecht.net> writes: > I am looking for a good systems programming language > that can be used instead of C/C++. My qualifications > for the language are: > > * mature compiler(s) that produce native-code > binaries (for Windows) Ocaml, D, cyclone, Eiffel, Beta > * open source - preferable, but not 100% necessary what's wrong with using C? Friedrich > what's wrong with using C? Too low level, no built-in garbage collection. -- Kevin "Kevin Albrecht" <kevin@albrecht.net> writes: >> what's wrong with using C? > > Too low level, Well the Smalltalk people say, have a small language and a big library. I assume C's library status beyond that of Smalltalk. > no built-in garbage collection. Use the Boehm Weisser GC. Friedrich "Kevin Albrecht" <kevin@albrecht.net> wrote in message news:<2TiYb.237892$rj7.1641209@twister.tampabay.rr.com>... > I am looking for a good systems programming language > that can be used instead of C/C++. My qualifications > for the language are: > > * mature compiler(s) that produce native-code > binaries (for Windows) > ...

Re: How to get rid of warning message from proc dataset #4
Coding NOLIST also works. 52 proc datasets nolist; 53 copy in=temp out=t2path; 54 select try; 55 quit; NOTE: Copying TEMP.TRY to T2PATH.TRY (memtype=DATA). NOTE: There were 1 observations read from the data set TEMP.TRY. NOTE: The data set T2PATH.TRY has 1 observations and 0 variables. NOTE: PROCEDURE DATASETS used (Total process time): real time 0.01 seconds cpu time 0.00 seconds I think RROC DATASET is try applying the SELECT to the list of library members it prints by default. With no LIBRARY= option it defaults to WORK, but TRY does not exist. I had to see your example to understand the question. On 10/2/07, Howard Schreier <hs AT dc-sug DOT org> <nospam@howles.com> wrote: > On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_sas@YAHOO.COM> wrote: > > >Hey, guys, > > > >I submitted the followin codes, and get warning message as "Warning: > >No matching members in directory". I cheked some papers, SAS gave such > >message when library is not specified. But in my case, the library is > >defined. > >And the warning still exists the second time I run the code. Does any > >one know how to get rid of the warning? (note: try is a sas dataset) . > >Many thanks. > > > >libname temp 'C:\Documents and Settings\Desktop\test'; > >libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; > > > &g...

empty variables
I have perl code which should do some action only if: - the variable does not begin with "#" (commented out), - the variable is not empty use strict; use warnings; my @array = ("# Comment", "/usr/bin/binary --test", ""); foreach my $var (@array) { my @execargs = split(/#/, $var); if ( $execargs[0] ne '' ) { print "$var 0: |$execargs[0]|\n" } } Unfortunately, it shows uninitialized value warnings for the empty variable (""): $ perl test.pl /usr/bin/binary --test 0: |/usr/bin/binary --test| Use of uninitia...

Acronis Thrue Image Has Created Two Temporary C-Drives. How Do I Get Rid of Them?
Acronis True Image creates new temporary drive names in order to view the images. Now, I have two extra drives, M:, N:, with the same name as my C-drive: DRIVE-C. This confuses many of my programs. How do I get rid of these extra drives (M and N) without deleting my entire C-drive? Thanks! maria Thank you, WD! I missed it in the instructions. Actually, I did what you said in Total Commander. maria On Wed, 03 Aug 2005 00:32:10 -0400, Will Dormann <wdormann@yahoo.com.invalid> wrote: >maria wrote: >> Acronis True Image creates new temporary drive names in or...

How to get signed zeros in C++/C?
I don't find how to express signed zeros in C++/C. Does anybody know what is the proper way to do so? Are they just -0.0 and +0.0? How to distinguish signed zeros from true zeros. http://en.wikipedia.org/wiki/Signed_zero Regard, Peng Peng Yu <pengyu.ut@gmail.com> writes: > I don't find how to express signed zeros in C++/C. Does anybody know > what is the proper way to do so? Are they just -0.0 and +0.0? How to > distinguish signed zeros from true zeros. > > http://en.wikipedia.org/wiki/Signed_zero AFAIK there is no literal for those. You need to ...

Just getting started in C++, C+
Thanks in advance to all of you, Your recommendations: What kind of instruction and software are needed to learn and do useful programming using C+, C++ ? I would like to access and use the windows graphics environment. SRabin, > What kind of instruction and software are needed to learn and do useful > programming using C+, C++ ? There is nothing like C+. A good tutorial: http://www.cplusplus.com/doc/tutorial/ > I would like to access and use the windows graphics environment. Free: DevC++ (core c++, that black command line window) + WxWidgets (for graphical user interfaces) C...

Where to get a compatibility list of C and C++?
Hi, all! I'm looking for a list of features that are supported in C but not supported in C++. I also need the complete list of language alterations from K&R C to C89 then to C99. Would anyone help? Thanks! Aladdin On 25 Jul 2005 18:44:11 -0700, "Aladdin" <buaa_aladdin@163.com> wrote in comp.lang.c: > Hi, all! > > I'm looking for a list of features that are supported in C but not > supported in C++. I also need the complete list of language alterations > from K&R C to C89 then to C99. > > Would anyone help? Thanks! > > Aladdin ...

Web resources about - Getting rid of warnings - comp.lang.c

Ballistic Missile Early Warning System - Wikipedia, the free encyclopedia
Site I- A United States Air Force facility at Thule Air Base , Greenland , ( 76°34′08″N 68°19′05″W  /  76.569°N 68.318°W  / 76.569; -68.318 ...

WARNING: Zeus Trojan Using Facebook Login Pages As Bait To Target Credit-Card Info
The Zeus Trojan is on the prowl again, hungry for credit-card information and other personal data, and Facebook is being used as the bait. continued… ...

Brussels explosions: Turkey says it deported attacker, Belgium ignored warning
One of the attackers in the Brussels suicide bombings was deported last year from Turkey, and Belgium subsequently ignored a warning that the ...

Brussels explosions: Turkey says it deported attacker, Belgium ignored warning
One of the attackers in the Brussels suicide bombings was deported last year from Turkey, and Belgium subsequently ignored a warning that the ...

Brussels attacks: Belgium accused of ignoring warnings about suicide bomber
... prosecutor confirms two brothers were responsible for attacks in Brussels, while the Turkish President says Belgian authorities ignored warnings ...

FDA adds strongest warning to popular painkillers
Federal health regulators will add their strongest warning labels to the most widely used prescription painkillers, part of a multi-pronged government ...

Winter Storm Warnings Posted For Lower Peninsula Counties Until Late Thursday
Winter Storm Warnings Posted For Lower Peninsula Counties Until Late Thursday 9&10 News Never mind, we got it! FBI claims it found a way into ...

Hyundai recalls Santa Fe Sport for seatbelt warning light
... Hyundai will recall 34,200 examples of the 2016 and 2017 Santa Fe Sport because of potential damage to the wiring for the seatbelt warning light. ...

Warning: Update to iOS 9.3 right now to fix a serious iPhone security vulnerability
We've already given you so many reasons to update your iPhone or iPad to iOS 9.3 when we showed you all the best new features in Apple's latest ...


Resources last updated: 3/24/2016 4:12:10 PM