Browse Source

Initialize wakeup_fd to keep GCC (with optimization level -O3) happy.

GCC with optimization level -O3 complains about potential uninitialized
values
Sree Kuchibhotla 9 năm trước cách đây
mục cha
commit
8d5807cefc
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/core/lib/iomgr/wakeup_fd_pipe.c

+ 2 - 0
src/core/lib/iomgr/wakeup_fd_pipe.c

@@ -95,6 +95,8 @@ static void pipe_destroy(grpc_wakeup_fd* fd_info) {
 
 static int pipe_check_availability(void) {
   grpc_wakeup_fd fd;
+  fd.read_fd = fd.write_fd = -1;
+
   if (pipe_init(&fd) == GRPC_ERROR_NONE) {
     pipe_destroy(&fd);
     return 1;