Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler warning in va_enc_h264.h with C++ #35

Closed
d-scott-phillips opened this issue Mar 15, 2017 · 1 comment
Closed

Compiler warning in va_enc_h264.h with C++ #35

d-scott-phillips opened this issue Mar 15, 2017 · 1 comment

Comments

@d-scott-phillips
Copy link

When compiling C++ code which includes va_enc_h264.h, this warning is emitted (marked error below because of -Werror):

.../va_enc_h264.h:577:13: error: empty union has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat]
            union {
            ^

Just deleting the empty bits union should fix this without affecting ABI compatibility.

@xhaihao
Copy link
Contributor

xhaihao commented Mar 16, 2017

I think the inner structure should be
union {
struct {
} bits;
unsigned int value;
} inter_fields;

otherwise what is the field of value?

xhaihao referenced this issue in xhaihao/libva Aug 14, 2017
The type of bits should be a struct type, otherwise the flags in bits
will be impacted each other.

In addtion this adds a reserved byte to bits struct in inter_fields,
this should fix https://github.com/01org/libva/issues/35

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
xhaihao referenced this issue in xhaihao/libva Aug 16, 2017
The type of bits should be a struct type, otherwise the flags in bits
will be impacted each other.

In addtion this adds a reserved byte to bits struct in inter_fields,
this should fix https://github.com/01org/libva/issues/35

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
xhaihao referenced this issue Aug 16, 2017
The type of bits should be a struct type, otherwise the flags in bits
will be impacted each other.

In addtion this adds a reserved byte to bits struct in inter_fields,
this should fix https://github.com/01org/libva/issues/35

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
xhaihao referenced this issue Sep 4, 2017
The type of bits should be a struct type, otherwise the flags in bits
will be impacted each other.

In addtion this adds a reserved byte to bits struct in inter_fields,
this should fix https://github.com/01org/libva/issues/35

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants