SRC\file.h:34: warning: [#1162-D] excess initializers are ignored Reason: When there are more members in statically declared array, then it's size Example: int array[2] = { 1, 2, 3, 4 }; There are 4 members, but the size is only 2. Problems: Somewhere in the code you may refer to member of this array programmatically (non-detectable by compiler). Size < Number of elements: In this case you will access the wrong memory region - both dangerous for read and write. Size > Numer of elements: In this case some of the elements will be unitialized. Bad for reading.
0 Comments
Your comment will be posted after it is approved.
Leave a Reply. |
AuthorWarnings are important! Archives
May 2017
Categories |