Const correctness for char* strings
authorJon Beniston <jon@beniston.com>
Thu, 28 Jul 2016 14:42:55 +0000 (16:42 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 28 Jul 2016 14:46:15 +0000 (16:46 +0200)
commitc45d26308211c383903cb06f15ba7575d807fe06
tree5eda192aee84ba10c14dcc9a838edb12354dd8d7
parent223e5aae4f0dcf228d758ae60f02398e3d1e95da
Const correctness for char* strings

This changes the API for the ftdi_get_error_string(),
but the fix is really simple.

From the mailinglist:

The attached patch fixes some warnings/errors when compiled with g++ and
another compiler:

- Strings should be const char *
- Malloc needs to be cast from void * to char *
- Avoid mixing declarations with code
ftdipp/ftdi.cpp
ftdipp/ftdi.hpp
src/ftdi.c
src/ftdi.h