Hi Dan,

You wrote on Tue, Jan 07, 2020 at 11:18:30AM -0500:
> These strings are not modified and it doesn't make sense that they ever
> would be. Setting these as const ensures that they will not be modified
> and allows const strings to be passed in without special manipulation.
> 
> Specifically a call like the following will fail to compile:
> ftdi_eeprom_set_strings(&ftdi, "foo", "bar", "abc123");
> 
> The error will look something like this:
> error: ISO C++ forbids converting a string constant to ‘char*’
> [-Werror=write-strings]

thanks for the patch, applied!


Given recent juggling on my side with Rust, C++ and C, I inspected the ABI
of the library if anything changes at all as a precaution -> all stable.

Nice tool to check for ABI changes in libs:
https://lvc.github.io/abi-compliance-checker/

For testing the tool I changed the "serial" parameter bogusly from
"const char *" to "char" and the tool caught it. Sweet!

Cheers,
Thomas

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscr...@developer.intra2net.com   

Reply via email to