libftdi: pass eeprom strings as const
authorDan Dedrick <dan.dedrick@gmail.com>
Tue, 7 Jan 2020 16:18:30 +0000 (11:18 -0500)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 15 Jan 2020 20:04:47 +0000 (21:04 +0100)
commitae3d154b7641b120f537c6d86871371c9d75c9e9
treeee0c49329044931dc66f3060c395849048185950
parent51962d0874d4e731ff6ed93dbe838d4d4fcec55c
libftdi: pass eeprom strings as const

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 failed 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]
src/ftdi.c
src/ftdi.h