u-blox / ubxlib

Portable C libraries which provide APIs to build applications with u-blox products and services. Delivered as add-on to existing microcontroller and RTOS SDKs.
Apache License 2.0
287 stars 82 forks source link

disable string truncation warning #214

Closed NathanMOlson closed 3 months ago

NathanMOlson commented 3 months ago

This "fixes" a compile error experiences on Linux with GCC 11.4.0.

RobMeades commented 3 months ago

Hi, thanks for this: I guess the truncation warning is occurring somewhere other than the ones that we already tried to shut up in 1f93918f83ef54b56ea22e892578f5da19c94a32 and bc8e776ce9c185f605dfe6031a00b40acadeeefb?

NathanMOlson commented 3 months ago

Error is at ubxlib/port/platform/linux/src/u_port_uart.c:394:13

RobMeades commented 3 months ago

Interestingly, I changed that very line yesterday, see 208ef1b54cb1fc6e245986b8fbb85ecdf252d4df, so it could be a pointer to a real problem in this case. Don't suppose you'd be willing to pull master from here and see if that happens to have fixed it would you? If it hasn't, I'm also very happy to take your PR as we haven't been able to switch-up to the latest GCC as it messes up something else, and I'm finding this particular GCC warning quite annoying.

NathanMOlson commented 3 months ago

@RobMeades I've pulled your latest changes from master, and it still fails to compile without 06a0869. With that and b08e5ab, I've achieved "hello world" with my M9 receiver.

RobMeades commented 3 months ago

Thanks for checking, and good catch on the b08e5ab0d072c957486e79835934b958c940b120, we should add a GNSS device connected via USB in our test system to test that case (only have I2C, SPI and UART today). I will pull your PR locally to run through testing, then merge.