C3401: Resulting string is not zero terminated

[WARNING]

Description

The compiler issues this message if a the resulting string is not terminated with a zero byte. Thus if such a string is used for printf or strcpy, the operation may fail. In C it is legal to initialize an array with a string if the string fits without the zero byte.

Example
  void main(void) {

  
    char buf[3] = "abc";

  
  }

  
Tips

For array initialization it is always better to use [] instead to specify the size:

  char buf[] = "abc";