* no error in strange sintaxis return()
@ 2005-09-16 15:02 Fco. J
0 siblings, 0 replies; only message in thread
From: Fco. J @ 2005-09-16 15:02 UTC (permalink / raw)
To: gcc-help
Hello, while I was trying to return local variable as (const char *)
return "value_of_var_a";
I put a strange return, something like this:
return ("%s",a);
> unsigned char *
> laca (const unsigned char *page, const unsigned int id)
> {
> unsigned char a[SIZE_MARCA];
> strcpy (a, "Hello");
> if (id == 1)
> {
> return "page1";
> }
> else
> {
> /*printf("%u",("%s",a));*/ /*strange sintaxis*/
> return ("%s",a); /*strange sintaxis*/
> };
> }
No warning messages are returned by compiler! Why?
And if I uncomment printf(...), program return correct stream. Commented anything is returned.
Compiler should caught the last argument of lists only (a).
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-16 15:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-16 15:02 no error in strange sintaxis return() Fco. J
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).