-
Notifications
You must be signed in to change notification settings - Fork 252
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
Coverage #303
base: master
Are you sure you want to change the base?
Coverage #303
Changes from 5 commits
25f733b
cee58f7
809a9cc
45da679
ca30b0f
b67a60d
7fd5057
dd748ea
3d2f477
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ if test "$GCC" = yes; then | |
-Wshadow -Wpointer-arith $cast_align -Wwrite-strings \ | ||
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes \ | ||
-Wnested-externs $CFLAGS" | ||
CXXFLAGS=" -g -W -Wall -Wpointer-arith $cast_align $wshadow -Wwrite-strings $CXXFLAGS" | ||
CXXFLAGS=" -std=gnu++11 -g -W -Wall -Wpointer-arith $cast_align $wshadow -Wwrite-strings $CXXFLAGS" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is okay, but I would prefer a minimum level of this, while allowing higher standards if the compiler supports it... (I'm working on cmake which handles this easier than autotools this so don't worry about it) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah just the code get so much nicer ... for the for () loops There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I'm saying that if C++14 is available I want to use that instead of C++11. I'm not sure how far back we want to support C++ standards, maybe the next release should require C++11, and C++17 for the one after that? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My vote would be c++ 14 for the next release, and 17 after that. For what it's worth, I've seen several areas of code that could profit from string_view in C++ 17. |
||
AC_MSG_NOTICE([Adding gcc options: $CFLAGS]) | ||
fi | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -568,7 +568,7 @@ bool Daemon::setup_listen_fds() | |
myaddr.sin_port = htons(daemon_port); | ||
myaddr.sin_addr.s_addr = INADDR_ANY; | ||
|
||
if (bind(tcp_listen_fd, (struct sockaddr *)&myaddr, | ||
if (::bind(tcp_listen_fd, (struct sockaddr *)&myaddr, | ||
sizeof(myaddr)) < 0) { | ||
log_perror("bind()"); | ||
sleep(2); | ||
|
@@ -602,7 +602,7 @@ bool Daemon::setup_listen_fds() | |
|
||
myaddr.sun_family = AF_UNIX; | ||
|
||
mode_t old_umask = -1U; | ||
mode_t old_umask = (mode_t)-1U; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. odn't use C style cases - I think you want static_cast here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, personally I jut hate the extra typing :) |
||
|
||
if (getenv("ICECC_TEST_SOCKET") == NULL) { | ||
#ifdef HAVE_LIBCAP_NG | ||
|
@@ -650,17 +650,17 @@ bool Daemon::setup_listen_fds() | |
} | ||
} | ||
|
||
if (bind(unix_listen_fd, (struct sockaddr*)&myaddr, sizeof(myaddr)) < 0) { | ||
if (::bind(unix_listen_fd, (struct sockaddr*)&myaddr, sizeof(myaddr)) < 0) { | ||
log_perror("bind()"); | ||
|
||
if (old_umask != -1U) { | ||
if (old_umask != (mode_t)-1U) { | ||
umask(old_umask); | ||
} | ||
|
||
return false; | ||
} | ||
|
||
if (old_umask != -1U) { | ||
if (old_umask != (mode_t)-1U) { | ||
umask(old_umask); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the c style comment end - this is a C++ comment