Fix uninitialized warning (#560)

This commit is contained in:
Dominic Hamon 2018-03-25 20:05:31 +01:00 committed by GitHub
parent 7b03df7ff7
commit e7eb54b5f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,13 +28,13 @@ private:
int main(int, char*[]) {
// this test verifies compilation of DoNotOptimize() for some types
char buffer8[8];
char buffer8[8] = "";
benchmark::DoNotOptimize(buffer8);
char buffer20[20];
char buffer20[20] = "";
benchmark::DoNotOptimize(buffer20);
char buffer1024[1024];
char buffer1024[1024] = "";
benchmark::DoNotOptimize(buffer1024);
benchmark::DoNotOptimize(&buffer1024[0]);