I have used this:
cont uint8_t *x[] = { "a", "b" }
compiler don't generate warning but UV4.70 has warning flag on left side "initializing const uint8_t * with an expression of type char[] converts b/w pointer to inetegr of different sign"
How to avoid this.
Can some one provide way to remove warning:
const uint8_t *my_data[] = { {""}, {"INT"}, {"SIN"}, {"AXI"}, {"CON"}, {"ST "}, {"NOR"}, {"..."},
};
warning: braces around scaler initializer
warning: ..............(As I written in original post)
Here the second warning:
"initializing const uint8_t * with an expression of type char[] converts b/w pointer to inetegr of different sign"
So - does your project run with signed or unsigned char type? Is "hello" a C string of signed or unsigned characters?
So don't do that, then!!
sir i have removed braces. what about other warning. i don't understand what per asked
Strings are comprised of characters (char type), not small integers. Use a char array for strings. Use a uint8_t array to hold small unsigned integers.
#include <stdio.h> const char * const Texts[] = { "Text-INT", "Txt-SIN", "Tx-AXI" }; int main(void) { }
Tested with Windows XP, Code::Blocks 10.05
Note that Code::Blocks is an IDE. And it supports a large set of different compilers - gcc is just one of many.