ltq-adsl-app: Fix compilation with GCC 14
authorHauke Mehrtens <[email protected]>
Fri, 2 May 2025 21:42:29 +0000 (23:42 +0200)
committerHauke Mehrtens <[email protected]>
Sat, 3 May 2025 20:04:13 +0000 (22:04 +0200)
commit09b89c96cea2f48557604e12fbe10c000d676f9c
tree1acfe857bc08402d072bfd89c85ab216b60bf145
parent8ffd3dfb10559ba55397c9bef8141635e8e3a734
ltq-adsl-app: Fix compilation with GCC 14

This fixes the following compile problem:
```
checking for asm/types.h... dsl_cpe_linux.c: In function 'DSL_CPE_ThreadInit':
dsl_cpe_linux.c:779:25: error: assignment to 'DSL_CPE_Thread_t' {aka 'int'} from 'pthread_t' {aka 'struct __pthread *'} makes integer from pointer without a cast [-Wint-conversion]
  779 |          pThrCntrl->tid = tid;
      |                         ^
dsl_cpe_linux.c: In function 'DSL_CPE_ThreadDelete':
dsl_cpe_linux.c:862:44: error: passing argument 1 of 'pthread_cancel' makes pointer from integer without a cast [-Wint-conversion]
  862 |             switch(pthread_cancel(pThrCntrl->tid))
      |                                   ~~~~~~~~~^~~~~
      |                                            |
      |                                            DSL_CPE_Thread_t {aka int}
In file included from dsl_cpe_linux.h:35:
/builder/shared-workdir/build/staging_dir/toolchain-mips_mips32_gcc-14.2.0_musl/include/pthread.h:98:20: note: expected 'pthread_t' {aka 'struct __pthread *'} but argument is of type 'DSL_CPE_Thread_t' {aka 'int'}
   98 | int pthread_cancel(pthread_t);
      |                    ^~~~~~~~~
dsl_cpe_linux.c: In function 'DSL_CPE_ThreadIdGet':
dsl_cpe_linux.c:1123:11: error: returning 'pthread_t' {aka 'struct __pthread *'} from a function with return type 'DSL_CPE_Thread_t' {aka 'int'} makes integer from pointer without a cast [-Wint-conversion]
 1123 |    return pthread_self();
      |           ^~~~~~~~~~~~~~
```

While at it, fix also some additional build warnings.

Link: https://github.com/openwrt/openwrt/pull/18688
Signed-off-by: Hauke Mehrtens <[email protected]>
package/network/config/ltq-adsl-app/Makefile
package/network/config/ltq-adsl-app/patches/020-gcc-14-fixes.patch [new file with mode: 0644]