Yup! The answer is painfully silly!  (I experienced this when I moved up in
GCCs)

One of these should work:

 sprintf(sql, "SELECT * FROM %s \
   where note_to='%s' \
   OR note_to='%s' \
   OR note_to='%s' \
   OR note_to='%s' \
   OR note_sender='%s'\
   AND note_valid=2",\

 OR

 sprintf(sql, "SELECT * FROM %s"
   "where note_to='%s' "
   "OR note_to='%s' "
   "OR note_to='%s' "
   "OR note_to='%s' "
   "OR note_sender='%s' "
   "AND note_valid=2", 
 
Hope that helps!

Jason

> 
> -----Original Message-----
> From: Tom Whiting [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, November 09, 2003 3:14 PM
> To: [email protected]
> 
> Hiya,
> Just switched from redhat 7.3 to 9.0, and as usual with the 
> glibc / gcc updates, I get more unknown warnings. Usually I'd 
> handle them easily enough, but these ones I actually want to 
> suppress if possible, because of the code that's being put together. 
> The warning:
> notes.c:534:16: warning: multi-line string literals are 
> deprecated What it's referring to:
> sprintf(sql, "SELECT * FROM %s
>   where note_to='%s' 
>   OR note_to='%s' 
>   OR note_to='%s' 
>   OR note_to='%s' 
>   OR note_sender='%s'
>   AND note_valid=2",
> 
> 
> Now, this is more a personal pref thing, usually I won't 
> throw large SQL statements into one line, because that makes 
> it harder for me to sort through (and that one line can be 
> pretty damned long), so I'll put one or two conditions on one line.
> 
> The question:
> Has anyone actually managed to suppress these? I know with 
> trigraphs, all I have to do is add -Wno-trigraphs to the 
> makefile, unfortunately I can't seem to suppress these 
> warnings. I've tried -Wno-deprecated-declarations , it didn't 
> do any good.
> Obviously the alternative is to cram a rather large(ish) sql 
> statement into one line, which, I'm just not really after 
> doing. IF they can't be suppressed, is there another way to do this?
> 
> 
> 
> 
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
> 

Reply via email to