assignment from incompatible pointer type

Max Romanov max.romanov at nginx.com
Thu Feb 3 13:39:05 UTC 2022


Hello.

It seems go module sources is outdated. Please fetch the version tagged same version as Unit.

—
Max

> On 3 Feb 2022, at 13:40, Andrey Oktyabrskiy <ano at bestmx.net> wrote:
> 
> Strange error during "go build":
> 
> # unit.nginx.org/go
> nxt_cgo_lib.c: In function ‘nxt_cgo_run’:
> nxt_cgo_lib.c:29:36: warning: assignment to ‘void (*)(nxt_unit_t *, nxt_unit_ctx_t *, nxt_unit_port_t *)’ {aka ‘void (*)(struct nxt_unit_s *, struct nxt_unit_ctx_s *, struct nxt_unit_port_s *)’} from incompatible pointer type ‘void (*)(nxt_unit_t *, nxt_unit_port_t *)’ {aka ‘void (*)(struct nxt_unit_s *, struct nxt_unit_port_s *)’} [-Wincompatible-pointer-types]
>   29 |     init.callbacks.remove_port     = nxt_go_remove_port;
>      |                                    ^
> nxt_cgo_lib.c:31:36: warning: assignment to ‘ssize_t (*)(nxt_unit_ctx_t *, nxt_unit_port_t *, void *, size_t,  void *, size_t *)’ {aka ‘long int (*)(struct nxt_unit_ctx_s *, struct nxt_unit_port_s *, void *, long unsigned int,  void *, long unsigned int *)’} from incompatible pointer type ‘ssize_t (*)(nxt_unit_ctx_t *, nxt_unit_port_t *, void *, size_t, void *, size_t)’ {aka ‘long int (*)(struct nxt_unit_ctx_s *, struct nxt_unit_port_s *, void *, long unsigned int,  void *, long unsigned int)’} [-Wincompatible-pointer-types]
>   31 |     init.callbacks.port_recv       = nxt_cgo_port_recv;
>      |                                    ^
> 
> 
> What's wrong and how to fix?
> _______________________________________________
> unit mailing list -- unit at nginx.org
> To unsubscribe send an email to unit-leave at nginx.org



More information about the unit mailing list