summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSimon Herkenhoff <sherkenhoff@jp.adit-jv.com>2018-10-10 10:43:11 +0900
committerSaya Sugiura <ssugiura@jp.adit-jv.com>2019-05-06 15:55:07 +0900
commit40590be05c5eb99f557dfca6f7f6623dcdbe334a (patch)
tree8542563eacb18119b76f2264cc557ab6739031b8 /cmake
parentdf6fc2a1ce9f3a1778e9c8e14c800cd2ad96e96e (diff)
downloadDLT-daemon-40590be05c5eb99f557dfca6f7f6623dcdbe334a.tar.gz
Fix compiler warnings
Fix compiler warnings about socket usage Correct the data types used for the socket declaration. We use AF_UNIX sockets so we use struct sockaddr_un, but we need to cast to struct sockaddr for the socket API. Fix compiler warnings about sign-compare Fix two occurences of signed - unsigned comparison by casting the values accordingly. Note that the cast is legal as the first parts of both conditional statements make sure the value is not negative before casting to unsigned. While at it, add strtol error checking. Fix compiler warnings about string functions Add string.h to src/daemon/dlt_daemon_unix_socket.c, because it was unaware of memcpy and strerror. While at it, change unsafe use of sprintf to proper dlt_vlog and remove the char buffer. Fix compiler warnings about unused-* Fix two unused-variable and one unused-parameter warning. While at it, change the #ifdef to not run into an empty block. Simply reverse the condition and enclose the complete else with the #ifdef. POSIX: Use memset instead of bzero "The bzero() function is deprecated (marked as LEGACY in POSIX.1-2001); use memset(3) in new programs." Use memset instead of bzero and remove any occurrence from DLT. Include of header "strings.h" that has bzero is also removed. Signed-off-by: Simon Herkenhoff <sherkenhoff@jp.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com> Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/CMakeLists.txt2
1 files changed, 0 insertions, 2 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 0182d2a..5ba0040 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -36,7 +36,6 @@ CHECK_INCLUDE_FILES( stddef.h HAVE_STDDEF_H)
CHECK_INCLUDE_FILES( stdint.h HAVE_STDINT_H)
CHECK_INCLUDE_FILES( stdlib.h HAVE_STDLIB_H)
CHECK_INCLUDE_FILES( string.h HAVE_STRING_H)
-CHECK_INCLUDE_FILES( strings.h HAVE_STRINGS_H)
CHECK_INCLUDE_FILES( sys/ioctl.h HAVE_SYSIOCTL_H)
CHECK_INCLUDE_FILES( sys/socket.h HAVE_SYSSOCKET_H)
CHECK_INCLUDE_FILES( sys/time.h HAVE_SYSTIME_H)
@@ -58,7 +57,6 @@ CHECK_INCLUDE_FILES( unistd.h HAVE_UNISTD_H)
INCLUDE(CheckFunctionExists)
-CHECK_FUNCTION_EXISTS( bzero HAVE_FUNC_BZERO)
CHECK_FUNCTION_EXISTS( clock_gettime HAVE_FUNC_CLOCKGETTIME)
CHECK_FUNCTION_EXISTS( floor HAVE_FUNC_FLOOR)
CHECK_FUNCTION_EXISTS( fork HAVE_FUNC_FORK)