Codes:
static int CheckOneReg(uint8_t busNo, char *title, int32_t addr, uint32_t *val, BOOL isPrintfNL, ErrMsg_t const *pMsg)
res |= CheckOneReg(busNo,"fwVer:", HALREG_FW_VER, &val, true, NULL);
res |= CheckOneReg(busNo, "status-0:", HALREG_SYS_STATUS_0 + 0, &val, true, MsgTbl_a3SysStatus);
Error:
ptr2ptr.cpp:224:86: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
res |= CheckOneReg(busNo, (const char *)”fwVer:”, HALREG_FW_VER, &val, true, NULL);
^
ptr2ptr.cpp:225:99: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
res |= CheckOneReg(busNo, “status-0:”, HALREG_SYS_STATUS_0 + 0, &val, true, MsgTbl_a3SysStatus);
How to Solve:
New Codes:
static int CheckOneReg(uint8_t busNo, char const *title, int32_t addr, uint32_t *val, BOOL isPrintfNL, ErrMsg_t const *pMsg)
Similar Posts:
- deprecated conversion from string constant to char*
- How to Solve Const variable assignment Error
- MySQL: invisible empty symbol char (9) char (10) char (13)
- [swscaler @ …] deprecated pixel format used, make sure you did set range correctly
- [Solved] Undefined reference_G++ _GLIBCXX_USE_CXX11_ ABI compilation error: STD:: Basic_String and STD::__cxx11::basic_String cannot match
- C++ error: cannot bind non-const lvalue reference of type ‘myString&’ to an rvalue of type ‘m…
- [Solved] undefined reference to `cv::imread(std::string const&, int)’
- [Solved] 0xC0000374: A heap has been corrupted !
- invalid conversion from ‘void* (*)()’ to ‘void* (*)(void*)’
- C++ Project Error: C Undefined symbols for architecture x86_64: “char_width(char)”