Use empty initializer lists for zeroing structs. This works around an incorrect Clang warning: https://llvm.org/bugs/show_bug.cgi?id=21689 Bug 15387371 Change-Id: I2460a4f6dd414f518789be1fcc8ce8b205c6a066 Reviewed-on: https://swiftshader-review.googlesource.com/4491 Reviewed-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Nicolas Capens <capn@google.com> Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/Common/Socket.cpp b/src/Common/Socket.cpp index 1a68fbb..a0ac3f4 100644 --- a/src/Common/Socket.cpp +++ b/src/Common/Socket.cpp
@@ -33,7 +33,7 @@ socket = -1; #endif - addrinfo hints = {0}; + addrinfo hints = {}; hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP;
diff --git a/src/Main/FrameBuffer.cpp b/src/Main/FrameBuffer.cpp index 9afd19f..bb1151f 100644 --- a/src/Main/FrameBuffer.cpp +++ b/src/Main/FrameBuffer.cpp
@@ -193,8 +193,7 @@ void FrameBuffer::copyLocked() { - BlitState update = {0}; - + BlitState update = {}; update.width = width; update.height = height; update.destFormat = destFormat;
diff --git a/src/Renderer/Renderer.cpp b/src/Renderer/Renderer.cpp index 6ad2be3..49e856e 100644 --- a/src/Renderer/Renderer.cpp +++ b/src/Renderer/Renderer.cpp
@@ -2522,7 +2522,7 @@ { terminateThreads(); - SwiftConfig::Configuration configuration = {0}; + SwiftConfig::Configuration configuration = {}; swiftConfig->getConfiguration(configuration); precacheVertex = !newConfiguration && configuration.precache;