richard_damon wrote on Friday, August 26, 2011:
The issue is that extern “C” says to use C linkages, but DOESN’T compile the contents as C code. Compilers are also free to warn about anything they feel about.
In this case, the compiler sees a structure with a const member and no constructor. It expects that the proper way to initilize the structure would be in the constructor, but you can also use direct initilzation like in C. Because you don’t have the constructor the compiler thinks it as suspicious, and so give the warning. (Note that it is defined as a const pointer to const signed char, so the element of the struct, the pointer, is const, thus you couldn’t set it with something.pcName = “foo”)