9fans / plan9port

Plan 9 from User Space
https://9fans.github.io/plan9port/
Other
1.62k stars 320 forks source link

9c: fix silence two gcc warnings #541

Closed lufia closed 2 years ago

lufia commented 2 years ago
$ gcc --version
gcc (GCC) 11.1.0

This PR stops two warnings like as:

u.h:65:42: warning: expression does not compute the number of elements in this array; element type is ‘struct __jmp_buf_tag’, not ‘long int’ [-Wsizeof-array-div]
   65 | typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)];

pipe.c:12:12: warning: argument 1 of type ‘int[2]’ with mismatched bound [-Warray-parameter=]
   12 | p9pipe(int fd[2])
bhuntsman commented 2 years ago

The first one is a second possible solution for issue #519 The alternative solution is pull request #520.

lufia commented 2 years ago

@bhuntsman I'd not seen them. Thanks.