rgbkrk / libvirt-go

[DEPRECATED] Go bindings for libvirt
https://github.com/libvirt/libvirt-go
MIT License
166 stars 50 forks source link

Remove "implicit declaration of function" warning #87

Closed vincentbernat closed 8 years ago

vincentbernat commented 8 years ago

Recent versions of gcc will complain about all the callbacks defined in Go and called from C are undefined functions.

We cannot use the generated "_cgo_export.h" file because it is not present yet. Introducing intermediary C functions that will call the Go function from a separate .c file importing "_cgo_export.h" seems overkill. Manual declaration of function prototypes is bothersome (and would need to be checked). Use of C preprocessor may help a bit but won't help in correctness as only the content of "_cgo_export.h" matters.

Therefore, it just seems easier to ignore those warnings.

rgbkrk commented 8 years ago

This needs a rebase after the last couple PRs that were merged.

vincentbernat commented 8 years ago

Rebased.