소스 검색

timer_create: volatile static -> static volatile

C11 6.11.5p1:

> The placement of a storage-class specifier other than at the
> beginning of the declaration specifiers in a declaration is an
> obsolescent feature.

gcc also warns about this.
Alex Xu (Hello71) 1 년 전
부모
커밋
c5459df188
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/time/timer_create.c

+ 1 - 1
src/time/timer_create.c

@@ -61,7 +61,7 @@ static void *start(void *arg)
 
 int timer_create(clockid_t clk, struct sigevent *restrict evp, timer_t *restrict res)
 {
-	volatile static int init = 0;
+	static volatile int init = 0;
 	pthread_t td;
 	pthread_attr_t attr;
 	int r;