소스 검색

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

GCC with optimization level -O3 complains about potential uninitialized
values
Sree Kuchibhotla 9 년 전
부모
커밋
8d5807cefc
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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;