J
JohnF
I like to compile (linux/gcc) with -pedantic -Wall
and neaten up the code to eliminate all warnings.
But the following code emits the message
warning: string length '1008' is greater than the
length '509' ISO C90 compilers are required to support
and I can't see a neat way around it. The offending
statement is,
static char latexwrapper[16384] =
"\\documentclass[10pt]{article}\n"
"\\usepackage[latin1]{inputenc}\n"
"\\usepackage{amsmath}\n"
"\\usepackage{amsfonts}\n"
"...lots-more-junk...";
I could obviously break it up into several smaller
initializations and strcat() them all at runtime,
but that (in my opinion) isn't what I meant by "neat".
It works as is, which is how I'd leave it if that's
(strcat() several smaller strings at runtime) is the
only solution. But a straightforward way around the
warning would be even nicer.
and neaten up the code to eliminate all warnings.
But the following code emits the message
warning: string length '1008' is greater than the
length '509' ISO C90 compilers are required to support
and I can't see a neat way around it. The offending
statement is,
static char latexwrapper[16384] =
"\\documentclass[10pt]{article}\n"
"\\usepackage[latin1]{inputenc}\n"
"\\usepackage{amsmath}\n"
"\\usepackage{amsfonts}\n"
"...lots-more-junk...";
I could obviously break it up into several smaller
initializations and strcat() them all at runtime,
but that (in my opinion) isn't what I meant by "neat".
It works as is, which is how I'd leave it if that's
(strcat() several smaller strings at runtime) is the
only solution. But a straightforward way around the
warning would be even nicer.