Skip to content
New issue

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

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

Already on GitHub? # to your account

Latest Zlog won't compile with gcc 4.7.2 #12

Closed
tleonhardt opened this issue Nov 16, 2012 · 2 comments
Closed

Latest Zlog won't compile with gcc 4.7.2 #12

tleonhardt opened this issue Nov 16, 2012 · 2 comments

Comments

@tleonhardt
Copy link

I downloaded the latest zlog tonight (2012-Nov-15) and tried compiling it with gcc 4.7.2 and it went like shown below:

todd@todd-Desk ~/Downloads/zlog-master $ make
cd src && make all
make[1]: Entering directory /home/todd/Downloads/zlog-master/src' cc -std=c99 -pedantic -c -O2 -fPIC -Wall -Werror -Wstrict-prototypes -g -ggdb buf.c In file included from /usr/include/string.h:642:0, from zc_xplatform.h:41, from zc_defs.h:26, from buf.c:26: In function ‘memset’, inlined from ‘zlog_buf_adjust_append’ at buf.c:615:11: /usr/include/x86_64-linux-gnu/bits/string3.h:82:30: error: call to ‘__warn_memset_zero_len’ declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters [-Werror] cc1: all warnings being treated as errors make[1]: *** [buf.o] Error 1 make[1]: Leaving directory/home/todd/Downloads/zlog-master/src'
make: *** [all] Error 2

The same exact code compiles fine on another computer with gcc 4.6.3

P.S. I've been using zlog for a few months and love how it is lightweight with a simple API and flexible rules, formats, etc.

@HardySimpson
Copy link
Owner

I pushed a fix to github, It seems that gcc>4.5 not allows the 3rd argument of memset() be 0

https://github.com/HardySimpson/zlog/archive/master.zip

As I don't have environment of gcc 4.7.2, please try it and tell me whether it works ~ ~

Happy to see you like zlog !

@tleonhardt
Copy link
Author

The fix you pushed now compiles, installs, and works just fine. Thanks for the very rapid fix.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants