Skip to content

sys/uart_stdio: compile with -Wno-cast-function-type#9121

Merged
cgundogan merged 1 commit intoRIOT-OS:masterfrom
kaspar030:uart_stdio_workaround
May 17, 2018
Merged

sys/uart_stdio: compile with -Wno-cast-function-type#9121
cgundogan merged 1 commit intoRIOT-OS:masterfrom
kaspar030:uart_stdio_workaround

Conversation

@kaspar030
Copy link
Copy Markdown
Contributor

Contribution description

This PR disables gcc's "cast-function-type" warning for uart_stdio.

Fixes

uart_stdio.c: In function 'uart_stdio_init':
uart_stdio.c:89:52: error: cast between incompatible function types from 'int (*)(isrpipe_t *, char)' {aka 'int (*)(struct <anonymous> *, char)'} to 'void (*)(void *, uint8_t)' {aka 'void (*)(void *, unsigned char)'} [-Werror=cast-function-type]
     uart_init(UART_STDIO_DEV, UART_STDIO_BAUDRATE, (uart_rx_cb_t) isrpipe_write_one, &uart_stdio_isrpipe);

(new with gcc 8.1)

@kaspar030 kaspar030 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 11, 2018
@kaspar030 kaspar030 requested a review from cgundogan May 11, 2018 21:04
@@ -1 +1,2 @@
CFLAGS += -Wno-cast-function-type
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to break llvm

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed by only disabling the warning for gnu toolchain.

@kaspar030 kaspar030 added State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet and removed State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet labels May 14, 2018
Copy link
Copy Markdown
Member

@cgundogan cgundogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK. Fixes my gcc 8 issues. Please squash and then let's see what Murdock has to say about that.

@kaspar030 kaspar030 force-pushed the uart_stdio_workaround branch from d7b22a8 to 1c03b67 Compare May 17, 2018 15:03
@kaspar030
Copy link
Copy Markdown
Contributor Author

squashed.

(embunit has a similar problem)

@cgundogan cgundogan merged commit ab00716 into RIOT-OS:master May 17, 2018
@kaspar030 kaspar030 deleted the uart_stdio_workaround branch May 17, 2018 19:11
@cladmi cladmi added this to the Release 2018.07 milestone Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants