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

Unexpected error using gcc-8 #50

Closed
aledbf opened this issue Jul 29, 2018 · 2 comments
Closed

Unexpected error using gcc-8 #50

aledbf opened this issue Jul 29, 2018 · 2 comments

Comments

@aledbf
Copy link

aledbf commented Jul 29, 2018

In file included from src/core/ngx_core.h:51,
                 from /tmp/build/nginx-opentracing-0.5.0/opentracing/src/opentracing_directive.h:6,
                 from /tmp/build/nginx-opentracing-0.5.0/opentracing/src/opentracing_directive.cpp:1:
/tmp/build/nginx-opentracing-0.5.0/opentracing/src/opentracing_directive.cpp: In function 'char* ngx_opentracing::add_opentracing_tag(ngx_conf_t*, ngx_array_t*, ngx_str_t, ngx_str_t)':
src/core/ngx_string.h:88:58: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ngx_opentracing::opentracing_tag_t'; use assignment or value-initialization instead [-Werror=class-memaccess]
 #define ngx_memzero(buf, n)       (void) memset(buf, 0, n)
                                                          ^
/tmp/build/nginx-opentracing-0.5.0/opentracing/src/opentracing_directive.cpp:92:3: note: in expansion of macro 'ngx_memzero'
   ngx_memzero(tag, sizeof(opentracing_tag_t));
   ^~~~~~~~~~~
In file included from /tmp/build/nginx-opentracing-0.5.0/opentracing/src/opentracing_directive.cpp:5:
/tmp/build/nginx-opentracing-0.5.0/opentracing/src/opentracing_conf.h:13:8: note: 'struct ngx_opentracing::opentracing_tag_t' declared here
 struct opentracing_tag_t {
        ^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[1]: *** [objs/Makefile:2716: objs/addon/src/opentracing_directive.o] Error 1
@rnburn
Copy link
Collaborator

rnburn commented Jul 30, 2018

@aledbf - can you try the change in #51?

I build with gcc8 as part of the test coverage, but the error doesn't show it with that version of gcc8.

@aledbf
Copy link
Author

aledbf commented Jul 30, 2018

can you try the change in #51?

It works 👍

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