In this piece of code (the whole file contains only one line):
char buffer[256] = { 0 };
Checked with Splint, I got the following hint:
foo.c(1,20): Initializer block for buffer has 1 element, but declared as char
[256]: 0
Initializer does not define all elements of a declared array. (Use
-initallelements to inhibit warning)
Initializer does not define all elements of a declared array. This is puzzling: I read some SO answers, but all of them claims that { 0 }
does initialize all elements to zero.
Splint version:
Splint 3.1.1 --- 12 April 2003
Maintainer: splint-bug@splint.org
Compiled using Microsoft Visual C++ 6.0
Downloaded from Splint.org.