ziutek / ftdi

Go binding for libFTDI
Other
25 stars 14 forks source link

CGo errors w/ Go-1.16 and libftdi1-1.5 #10

Closed sbinet closed 3 years ago

sbinet commented 3 years ago

with latest master (ie: what will become Go-1.16), one gets:

github.com/ziutek/ftdi
# github.com/ziutek/ftdi
cgo-gcc-prolog: In function ‘_cgo_2ab0b5d0f81b_Cfunc_ftdi_usb_purge_buffers’:
cgo-gcc-prolog:646:2: warning: ‘ftdi_usb_purge_buffers’ is deprecated [-Wdeprecated-declarations]
In file included from ../../../../pkg/mod/github.com/ziutek/ftdi@v0.0.0-20200720221836-9d134ea90daf/device.go:5:
/usr/include/libftdi1/ftdi.h:566:20: note: declared here
  566 |     int DEPRECATED(ftdi_usb_purge_buffers(struct ftdi_context *ftdi));
      |                    ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/libftdi1/ftdi.h:247:55: note: in definition of macro ‘DEPRECATED’
  247 | #define DEPRECATED(func) __attribute__ ((deprecated)) func
      |                                                       ^~~~
cgo-gcc-prolog: In function ‘_cgo_2ab0b5d0f81b_Cfunc_ftdi_usb_purge_rx_buffer’:
cgo-gcc-prolog:665:2: warning: ‘ftdi_usb_purge_rx_buffer’ is deprecated [-Wdeprecated-declarations]
In file included from ../../../../pkg/mod/github.com/ziutek/ftdi@v0.0.0-20200720221836-9d134ea90daf/device.go:5:
/usr/include/libftdi1/ftdi.h:564:20: note: declared here
  564 |     int DEPRECATED(ftdi_usb_purge_rx_buffer(struct ftdi_context *ftdi));
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/libftdi1/ftdi.h:247:55: note: in definition of macro ‘DEPRECATED’
  247 | #define DEPRECATED(func) __attribute__ ((deprecated)) func
      |                                                       ^~~~
cgo-gcc-prolog: In function ‘_cgo_2ab0b5d0f81b_Cfunc_ftdi_usb_purge_tx_buffer’:
cgo-gcc-prolog:684:2: warning: ‘ftdi_usb_purge_tx_buffer’ is deprecated [-Wdeprecated-declarations]
In file included from ../../../../pkg/mod/github.com/ziutek/ftdi@v0.0.0-20200720221836-9d134ea90daf/device.go:5:
/usr/include/libftdi1/ftdi.h:565:20: note: declared here
  565 |     int DEPRECATED(ftdi_usb_purge_tx_buffer(struct ftdi_context *ftdi));
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/libftdi1/ftdi.h:247:55: note: in definition of macro ‘DEPRECATED’
  247 | #define DEPRECATED(func) __attribute__ ((deprecated)) func
      |                                                       ^~~~
# github.com/ziutek/ftdi
../../../../pkg/mod/github.com/ziutek/ftdi@v0.0.0-20200720221836-9d134ea90daf/error.go:24:43: cannot use int32(e) (type int32) as type _Ctype_int in argument to _Cfunc_libusb_strerror