The waning is straight forward the we have deferent semantic meaning for Message. Make them the same ?
C has no such thing as a string.
You are declaring a single array of bytes in ram with 3 null terminated string in it. not 3 strings.
Think.
constantName TEXTEQU <""Line 1 Init msg\0Line 2 Init msg \0 \0">
.cdata
messages BYTE constantName
An array of strings is usually. Char * name[]; in c
Think about C as a pseudo macro assembler,
Give me a location to initialized ram that has this name and is this size and put this in it .
I do find suppressing warning is not a great thing , at some point you will wish it would help find things. ,
If what you want is a consecutive chunk of ram then change the definition to one chunk not 3 make it match your definition.
Like this **Note no comma's** if you want the null char also add them you self ( i believe for all but last one) . and compiler will not get confused and nag you .
const char messages[] = "Line 1 Init msg\0" "Line 2 Init msg \0" " "
MY eyes like this one better and exact same outcome a bunch of byes in ram with data initialized to this and named messages.
const char * messages = "Line 1 Init msg\0Line 2 Init msg \0 ";
C has no such thing as a string.
You are declaring a single array of bytes in ram with 3 null terminated string in it. not 3 strings.
Think.
constantName TEXTEQU <""Line 1 Init msg\0Line 2 Init msg \0 \0">
.cdata
messages BYTE constantName
An array of strings is usually. Char * name[]; in c
Think about C as a pseudo macro assembler,
Give me a location to initialized ram that has this name and is this size and put this in it .
I do find suppressing warning is not a great thing , at some point you will wish it would help find things. ,
If what you want is a consecutive chunk of ram then change the definition to one chunk not 3 make it match your definition.
Like this **Note no comma's** if you want the null char also add them you self ( i believe for all but last one) . and compiler will not get confused and nag you .
const char messages[] = "Line 1 Init msg\0" "Line 2 Init msg \0" " "
MY eyes like this one better and exact same outcome a bunch of byes in ram with data initialized to this and named messages.
const char * messages = "Line 1 Init msg\0Line 2 Init msg \0 ";
