You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building launchpad.net/goyaml produces a series of warnings:
decode.go: In function ‘_cgo_27a928056cbd_Cfunc_event_alias’:
decode.go:34:7: warning: assignment from incompatible pointer type [enabled by default]
decode.go: In function ‘_cgo_27a928056cbd_Cfunc_event_mapping_start’:
decode.go:44:7: warning: assignment from incompatible pointer type [enabled by default]
decode.go: In function ‘_cgo_27a928056cbd_Cfunc_event_scalar’:
decode.go:54:7: warning: assignment from incompatible pointer type [enabled by default]
decode.go: In function ‘_cgo_27a928056cbd_Cfunc_event_sequence_start’:
decode.go:64:7: warning: assignment from incompatible pointer type [enabled by default]
The Cgo-generated function for the first warning looks like
void
_cgo_27a928056cbd_Cfunc_event_mapping_start(void *v)
{
struct {
yaml_event_t* p0;
const struct {yaml_char_t* anchor; yaml_char_t* tag; int implicit; yaml_mapping_style_t style; }* r;
} __attribute__((__packed__)) *a = v;
a->r = (const struct {yaml_char_t* anchor; yaml_char_t* tag; int implicit; yaml_mapping_style_t style; }*) event_mapping_start((void*)a->p0);
}
The warning is on the `a->r = ...` line.
If I ask Clang to build this file, the warning is a bit more verbose:
decode.go:34:7: warning: incompatible pointer types assigning to 'const struct
<anonymous struct at decode.go:32:9> *' from 'const struct <anonymous struct at
decode.go:34:16> *' [-Wincompatible-pointer-types]
a->r = (const struct {yaml_char_t* anchor; }*) event_alias((void*)a->p0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What steps will reproduce the problem?
1. Build launchpad.net/goyaml
What is the expected output?
No warnings
What do you see instead?
The warnings listed above
Which compiler are you using (5g, 6g, 8g, gccgo)?
8g
Which operating system are you using?
Ubuntu 12.04
Which version are you using? (run 'go version')
go version go1.1 linux/386
The text was updated successfully, but these errors were encountered:
by kballard:
The text was updated successfully, but these errors were encountered: