Skip to content

Commit 2899c12

Browse files
wiseconnect: Compiler complains about discarded 'const' qualifier
gcc reports: .../sl_si91x_socket_utility.c: In function 'sli_prepare_select_request': .../sl_si91x_socket_utility.c:1446:70: warning: passing argument 2 of 'SL_SI91X_FD_ISSET' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 1446 | && ((readfds != NULL && SL_SI91X_FD_ISSET(host_socket_index, readfds)) | ^~~~~~~ In file included from .../sl_si91x_socket_utility.c:30: .../sl_si91x_socket_utility.h:333:72: note: expected 'sl_si91x_fdset_t *' {aka 'struct sl_si91x_fdset_s *'} but argument is of type 'const sl_si91x_fdset_t *' {aka 'const struct sl_si91x_fdset_s *'} 333 | static inline bool SL_SI91X_FD_ISSET(unsigned int n, sl_si91x_fdset_t *p) Signed-off-by: Jérôme Pouiller <[email protected]>
1 parent ea04f49 commit 2899c12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wiseconnect/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_utility.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static inline void SL_SI91X_FD_SET(unsigned int n, sl_si91x_fdset_t *p)
330330
p->__fds_bits |= 1U << n;
331331
}
332332

333-
static inline bool SL_SI91X_FD_ISSET(unsigned int n, sl_si91x_fdset_t *p)
333+
static inline bool SL_SI91X_FD_ISSET(unsigned int n, const sl_si91x_fdset_t *p)
334334
{
335335
return p->__fds_bits & (1U << n);
336336
}

0 commit comments

Comments
 (0)