Skip to content

Commit 99c602f

Browse files
committed
Fix build issues when RTT is enabled
Fixes raspberrypi/pico-examples#565
1 parent e68a144 commit 99c602f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/rp2_common/pico_stdio_rtt/SEGGER/RTT/SEGGER_RTT.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ Additional information:
7878

7979
#include <string.h> // for memcpy
8080

81+
#ifdef __GNUC__
82+
#pragma GCC diagnostic ignored "-Wcast-qual"
83+
#pragma GCC diagnostic ignored "-Wcast-align"
84+
#endif
85+
8186
/*********************************************************************
8287
*
8388
* Configuration, default values

src/rp2_common/pico_stdio_rtt/stdio_rtt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ void stdio_rtt_deinit(void) {
2626
}
2727

2828
static void stdio_rtt_out_chars(const char *buf, int length) {
29-
SEGGER_RTT_Write(0, buf, length);
29+
SEGGER_RTT_Write(0, buf, (unsigned)length);
3030
}
3131

3232
static int stdio_rtt_in_chars(char *buf, int length) {
33-
return SEGGER_RTT_Read(0, buf, length);
33+
return (int)SEGGER_RTT_Read(0, buf, (unsigned)length);
3434
}
3535

3636
stdio_driver_t stdio_rtt = {

0 commit comments

Comments
 (0)