Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile warnings #158

Open
Novus4K opened this issue May 12, 2024 · 0 comments
Open

compile warnings #158

Novus4K opened this issue May 12, 2024 · 0 comments

Comments

@Novus4K
Copy link

Novus4K commented May 12, 2024

What problems could these warnings cause in the future?


/home/ardumower/Sunray/sunray/src/ntrip/ntripclient.cpp: In member function ‘bool NTRIPClient::reqRaw(char*, int, char*)’:
/home/ardumower/Sunray/sunray/src/ntrip/ntripclient.cpp:161:36: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  161 |     return reqRaw(host,port,mntpnt,"","");
      |                                    ^~
/home/ardumower/Sunray/sunray/src/ntrip/ntripclient.cpp:161:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  161 |     return reqRaw(host,port,mntpnt,"","");
      |                                       ^~


/home/ardumower/Sunray/sunray/udpserial.cpp:18: warning: "CONSOLE" redefined
   18 |   #define CONSOLE Serial
      |
In file included from /home/ardumower/Sunray/sunray/udpserial.cpp:7:
/home/ardumower/Sunray/sunray/config.h:436: note: this is the location of the previous definition
  436 |   #define CONSOLE Console
      |
[ 93%] Building C object CMakeFiles/sunray.dir/home/ardumower/Sunray/sunray/src/icm/util/ICM_20948_C.c.o
/home/ardumower/Sunray/sunray/src/icm/util/ICM_20948_C.c: In function ‘inv_icm20948_firmware_load’:
/home/ardumower/Sunray/sunray/src/icm/util/ICM_20948_C.c:1411:9: warning: implicit declaration of function ‘memcmp’ [-Wimplicit-function-declaration]
 1411 |     if (memcmp(data_cmp, data, write_size)) // Compare the data
      |         ^~~~~~
/home/ardumower/Sunray/sunray/src/icm/util/ICM_20948_C.c:22:1: note: include ‘<string.h>’ or provide a declaration of ‘memcmp’
   21 | #include "icm20948_img.dmp3a.h"
  +++ |+#include <string.h>
   22 | };
/home/ardumower/Sunray/sunray/src/icm/util/ICM_20948_C.c:1411:32: warning: ‘memcmp’ argument 3 type is ‘int’ where ‘long unsigned int’ is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
 1411 |     if (memcmp(data_cmp, data, write_size)) // Compare the data
      |                                ^~~~~~~~~~
<built-in>: note: built-in ‘memcmp’ declared here
[ 94%] Building C object CMakeFiles/sunray.dir/home/ardumower/Sunray/sunray/src/mpu/arduino_mpu9250_clk.c.o
[ 95%] Building C object CMakeFiles/sunray.dir/home/ardumower/Sunray/sunray/src/mpu/inv_mpu.c.o
/home/ardumower/Sunray/sunray/src/mpu/inv_mpu.c: In function ‘mpu_reg_dump’:
/home/ardumower/Sunray/sunray/src/mpu/inv_mpu.c:48:19: warning: implicit declaration of function ‘_MLPrintLog’ [-Wimplicit-function-declaration]
   48 | #define log_i     _MLPrintLog
      |                   ^~~~~~~~~~~
/home/ardumower/Sunray/sunray/src/mpu/inv_mpu.c:613:9: note: in expansion of macro ‘log_i’
  613 |         log_i("%#5x: %#5x\r\n", ii, data);
      |         ^~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant