forked from Imagelibrary/lwip
PPP: Change data argument in sio_write to const
To fix the build after ppp_output_cb started taking it as const in
commit b2d1fc119d.
Fixes this failure:
../contrib/examples/ppp/pppos_example.c: In function ‘ppp_output_cb’:
../contrib/examples/ppp/pppos_example.c:163:29: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
return sio_write(ppp_sio, (u8_t*)data, len);
^
This commit is contained in:
@@ -300,7 +300,7 @@ void sio_expect_string( u8_t *str, sio_status_t * siostat )
|
||||
#endif /* ! (PPP_SUPPORT || LWIP_HAVE_SLIPIF) */
|
||||
|
||||
#if (PPP_SUPPORT || LWIP_HAVE_SLIPIF)
|
||||
u32_t sio_write(sio_status_t * siostat, u8_t *buf, u32_t size)
|
||||
u32_t sio_write(sio_status_t * siostat, const u8_t *buf, u32_t size)
|
||||
{
|
||||
ssize_t wsz = write( siostat->fd, buf, size );
|
||||
return wsz < 0 ? 0 : wsz;
|
||||
|
||||
Reference in New Issue
Block a user