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

Fix compiler warnings related to strings #697

Closed
wants to merge 2 commits into from

Conversation

averater
Copy link
Contributor

Fix string truncation and overflow warnings so the compiler flags stringop-overflow and stringop-truncation can be enabled.

This shouldn't change any behaviour nor fix any bugs. It is just to be able to run the compiler with those flags so future bugs can be avoided. However I have added some extra checks for string lengths.

Most changes is to avoid using strncat and instead use strcat. This doesn't make the code safer but removes the false safeness of using strncat wrongly.

Fix string truncation and overflow warnings so the compiler flags
stringop-overflow and stringop-truncation can be enabled.

This shouldn't change any behaviour nor fix any bugs. It is just
to be able to run the compiler with those flags so future bugs
can be avoided. However I have added some extra checks for string
lengths.

Most changes is to avoid using strncat and instead use strcat. This
doesn't make the code safer but removes the false safeness of using
strncat wrongly.
@averater averater mentioned this pull request Oct 29, 2024
@@ -113,7 +113,7 @@ void set_node_id(char *id)
exit(-1);
}
else {
strncpy(g_options.node_id, id, DLT_ID_SIZE);
strcpy(g_options.node_id, id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may overwrite the end of array g_options.node_id by one byte. node_id is not handled as a null terminated string.
strncpy is required to restrict the operation to 4 bytes. DLT IDs are not Null-terminated in dlt-daemon.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I have restored it. Since there is no length check of argv this is indeed needed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michael-methner
Good point for no null-terminated for App and Context ID

@minminlittleshrimp
Copy link
Collaborator

Same topic is here: #634

@minminlittleshrimp
Copy link
Collaborator

minminlittleshrimp commented Feb 20, 2025

Huge rework here: #732

-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type not defined. Using default build type 'RelWithDebInfo'.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for include file arpa/inet.h
-- Looking for include file arpa/inet.h - found
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file float.h
-- Looking for include file float.h - found
-- Looking for include file limits.h
-- Looking for include file limits.h - found
-- Looking for include file netdb.h
-- Looking for include file netdb.h - found
-- Looking for include file netinet/in.h
-- Looking for include file netinet/in.h - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for include file sys/ioctl.h
-- Looking for include file sys/ioctl.h - found
-- Looking for include file sys/socket.h
-- Looking for include file sys/socket.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file sys/ipc.h
-- Looking for include file sys/ipc.h - found
-- Looking for include file ctype.h
-- Looking for include file ctype.h - found
-- Looking for include file signal.h
-- Looking for include file signal.h - found
-- Looking for include file syslog.h
-- Looking for include file syslog.h - found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file linux/stat.h
-- Looking for include file linux/stat.h - found
-- Looking for include file sys/uio.h
-- Looking for include file sys/uio.h - found
-- Looking for include file termios.h
-- Looking for include file termios.h - found
-- Looking for include file mqueue.h
-- Looking for include file mqueue.h - found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for floor
-- Looking for floor - not found
-- Looking for fork
-- Looking for fork - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for inet_ntoa
-- Looking for inet_ntoa - found
-- Looking for malloc
-- Looking for malloc - found
-- Looking for memmove
-- Looking for memmove - found
-- Looking for memset
-- Looking for memset - found
-- Looking for mkfifo
-- Looking for mkfifo - found
-- Looking for select
-- Looking for select - found
-- Looking for socket
-- Looking for socket - found
-- Looking for strchr
-- Looking for strchr - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strstr
-- Looking for strstr - found
-- Looking for strtol
-- Looking for strtol - found
-- Looking for mq_open in /usr/lib/x86_64-linux-gnu/librt.so
-- Looking for mq_open in /usr/lib/x86_64-linux-gnu/librt.so - found
-- Looking for mq_close in /usr/lib/x86_64-linux-gnu/librt.so
-- Looking for mq_close in /usr/lib/x86_64-linux-gnu/librt.so - found
-- Looking for mq_unlink in /usr/lib/x86_64-linux-gnu/librt.so
-- Looking for mq_unlink in /usr/lib/x86_64-linux-gnu/librt.so - found
-- Looking for mq_send in /usr/lib/x86_64-linux-gnu/librt.so
-- Looking for mq_send in /usr/lib/x86_64-linux-gnu/librt.so - found
-- Looking for mq_receive in /usr/lib/x86_64-linux-gnu/librt.so
-- Looking for mq_receive in /usr/lib/x86_64-linux-gnu/librt.so - found
-- Looking for pthread_setname_np in -lpthread
-- Looking for pthread_setname_np in -lpthread - found
-- Using pthread_setname_np API to set thread name
-- Found GTest: /usr/local/lib/cmake/GTest/GTestConfig.cmake (found version "1.14.0")  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- 
-- -------------------------------------------------------------------------------
-- Build for Version 2.18.10 build v2.18.10_85_g7134f84 version state STABLE
-- WITH_SYSTEMD = OFF
-- WITH_SYSTEMD_WATCHDOG = OFF
-- WITH_SYSTEMD_JOURNAL = OFF
-- WITH_DOC = OFF
-- WITH_MAN = OFF
-- WITH_DLT_ADAPTOR = OFF
-- WITH_DLT_ADAPTOR_UDP = OFF
-- WITH_DLT_CONSOLE = ON
-- WITH_DLT_CONSOLE_WO_CTRL = OFF
-- WITH_DLT_CONSOLE_WO_SBTM = OFF
-- WITH_DLT_EXAMPLES = ON
-- WITH_DLT_SYSTEM = OFF
-- WITH_DLT_FILETRANSFER = OFF
-- WITH_DLT_DBUS = OFF
-- WITH_DLT_TESTS = ON
-- WITH_DLT_UNIT_TESTS = ON
-- WITH_DLT_INSTALLED_TESTS = OFF
-- GTEST_VERSION = 1.14.0
-- WITH_DLT_COVERAGE = OFF
-- WITH_DLT_SHM_ENABLE = OFF
-- WITH_DLTTEST = OFF
-- BUILD_GMOCK = OFF
-- WITH_GIT_SUBMODULE = OFF
-- WITH_DLT_PKGCONFIG = ON
-- WITH_DLT_CXX11_EXT = OFF
-- WITH_DLT_COREDUMPHANDLER = OFF
-- WITH_DLT_KPI = OFF
-- WITH_DLT_FATAL_LOG_TRAP = OFF
-- WITH_CHECK_CONFIG_FILE = OFF
-- WITH_TESTSCRIPTS = OFF
-- WITH_GPROF = OFF
-- WITH_DLT_USE_IPv6 = ON
-- DLT_USER = covesa
-- BUILD_SHARED_LIBS = ON
-- TARGET_CPU_NAME = 
-- CMAKE_INSTALL_PREFIX = /usr/local
-- CMAKE_BUILD_TYPE = RelWithDebInfo
-- CMAKE_HOST_SYSTEM_PROCESSOR = x86_64
-- CMAKE_SYSTEM_PROCESSOR = x86_64
-- WITH_DLT_LOGSTORAGE_CTRL_UDEV = OFF
-- WITH_DLT_LOGSTORAGE_GZIP = OFF
-- DLT_IPC = FIFO(Path: /tmp)
-- WITH_DLT_DAEMON_VSOCK_IPC = OFF
-- WITH_DLT_LIB_VSOCK_IPC = OFF
-- DLT_VSOCK_PORT = 13490
-- WITH_UDP_CONNECTION = OFF
-- WITH_DLT_QNX_SYSTEM = OFF
-- WITH_DLT_NETWORK_TRACE = ON
-- WITH_LIB_NO_VERSION = 
-- WITH_LIB_SHORT_VERSION = OFF
-- WITH_LEGACY_INCLUDE_PATH = ON
-- WITH_EXTENDED_FILTERING = OFF
-- WITH_DLT_DISABLE_MACRO = OFF
-- WITH_DLT_FILE_LOGGING_SYSLOG_FALLBACK = OFF
-- WITH_DLT_LOG_LEVEL_APP_CONFIG = OFF
-- WITH_DLT_TRACE_LOAD_CTRL = OFF
-- Change a value with: cmake -D<Variable>=<Value>
-- -------------------------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lum3hc/projects/core_v1/dlt-daemon/build
Scanning dependencies of target dlt
Scanning dependencies of target dlt-daemon
Scanning dependencies of target logfsync
Scanning dependencies of target dlt_daemon
[  0%] Building CXX object tests/components/logstorage/logstorage_fsync/CMakeFiles/logfsync.dir/logfsync.cpp.o
[  0%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/dlt_daemon_client.c.o
[  2%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/dlt_daemon_common.c.o
[  2%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o
[  3%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/dlt_daemon_connection.c.o
[  3%] Building C object src/lib/CMakeFiles/dlt.dir/dlt_user.c.o
[  4%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/dlt_daemon_event_handler.c.o
[  4%] Building C object src/lib/CMakeFiles/dlt.dir/dlt_filetransfer.c.o
[  4%] Building C object src/lib/CMakeFiles/dlt.dir/dlt_env_ll.c.o
[  5%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/dlt-daemon.c.o
[  5%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/dlt_daemon_client.c.o
[  6%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/dlt_daemon_common.c.o
[  7%] Building C object src/lib/CMakeFiles/dlt.dir/__/shared/dlt_common.c.o
[  9%] Building C object src/lib/CMakeFiles/dlt.dir/__/shared/dlt_log.c.o
[  9%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/dlt_daemon_connection.c.o
[ 10%] Building C object src/lib/CMakeFiles/dlt.dir/dlt_client.c.o
[ 11%] Linking CXX shared library liblogfsync.so
[ 11%] Building C object src/lib/CMakeFiles/dlt.dir/__/shared/dlt_multiple_files.c.o
[ 12%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/dlt_daemon_offline_logstorage.c.o
[ 12%] Built target logfsync
[ 13%] Building C object src/lib/CMakeFiles/dlt.dir/__/shared/dlt_protocol.c.o
[ 13%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/dlt_daemon_event_handler.c.o
[ 14%] Building C object src/lib/CMakeFiles/dlt.dir/__/shared/dlt_user_shared.c.o
[ 15%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/dlt_daemon_offline_logstorage.c.o
[ 16%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/dlt_daemon_serial.c.o
[ 17%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/dlt_daemon_serial.c.o
[ 17%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/dlt_daemon_socket.c.o
[ 18%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/dlt_daemon_unix_socket.c.o
[ 19%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/__/gateway/dlt_gateway.c.o
[ 19%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/__/lib/dlt_client.c.o
[ 19%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/dlt_daemon_socket.c.o
[ 20%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/__/shared/dlt_common.c.o
[ 21%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/dlt_daemon_unix_socket.c.o
[ 22%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/__/shared/dlt_config_file_parser.c.o
[ 22%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/__/gateway/dlt_gateway.c.o
[ 22%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/__/shared/dlt_log.c.o
[ 23%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/__/lib/dlt_client.c.o
[ 24%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/__/shared/dlt_common.c.o
[ 25%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/__/shared/dlt_multiple_files.c.o
[ 25%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/__/shared/dlt_config_file_parser.c.o
[ 26%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/__/shared/dlt_offline_trace.c.o
[ 27%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/__/shared/dlt_log.c.o
[ 27%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/__/shared/dlt_protocol.c.o
[ 28%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/__/shared/dlt_user_shared.c.o
[ 29%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/__/offlinelogstorage/dlt_offline_logstorage.c.o
[ 30%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/__/shared/dlt_multiple_files.c.o
[ 30%] Building C object src/daemon/CMakeFiles/dlt_daemon.dir/__/offlinelogstorage/dlt_offline_logstorage_behavior.c.o
[ 30%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/__/shared/dlt_offline_trace.c.o
[ 31%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/__/shared/dlt_protocol.c.o
[ 32%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/__/shared/dlt_user_shared.c.o
[ 32%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/__/offlinelogstorage/dlt_offline_logstorage.c.o
[ 33%] Building C object src/daemon/CMakeFiles/dlt-daemon.dir/__/offlinelogstorage/dlt_offline_logstorage_behavior.c.o
[ 33%] Linking C shared library libdlt.so
[ 33%] Built target dlt
Scanning dependencies of target dlt_control_common_lib
Scanning dependencies of target dlt-example-user-common-api
Scanning dependencies of target dlt-example-user
Scanning dependencies of target dlt-example-filetransfer
Scanning dependencies of target dlt-example-user-func
[ 33%] Building C object src/console/CMakeFiles/dlt_control_common_lib.dir/dlt-control-common.c.o
[ 34%] Building C object src/examples/CMakeFiles/dlt-example-user-common-api.dir/dlt-example-user-common-api.c.o
[ 34%] Building C object src/examples/CMakeFiles/dlt-example-filetransfer.dir/dlt-example-filetransfer.c.o
[ 35%] Building C object src/examples/CMakeFiles/dlt-example-user.dir/dlt-example-user.c.o
[ 35%] Building C object src/examples/CMakeFiles/dlt-example-user-func.dir/dlt-example-user-func.c.o
Scanning dependencies of target dlt-test-multi-process
Scanning dependencies of target dlt-test-stress
Scanning dependencies of target dlt-test-user
Scanning dependencies of target dlt-test-client
Scanning dependencies of target dlt-test-init-free
[ 36%] Building C object src/tests/CMakeFiles/dlt-test-user.dir/dlt-test-user.c.o
Scanning dependencies of target dlt-test-multi-process-client
[ 37%] Building C object src/tests/CMakeFiles/dlt-test-multi-process.dir/dlt-test-multi-process.c.o
[ 38%] Building C object src/tests/CMakeFiles/dlt-test-client.dir/dlt-test-client.c.o
[ 38%] Building C object src/tests/CMakeFiles/dlt-test-stress.dir/dlt-test-stress.c.o
[ 39%] Building C object src/tests/CMakeFiles/dlt-test-init-free.dir/dlt-test-init-free.c.o
[ 40%] Linking C executable dlt-example-user-common-api
[ 41%] Linking C static library libdlt_control_common_lib.a
[ 41%] Building C object src/tests/CMakeFiles/dlt-test-multi-process-client.dir/dlt-test-multi-process-client.c.o
[ 41%] Built target dlt-example-user-common-api
[ 42%] Linking C executable dlt-example-filetransfer
Scanning dependencies of target dlt-test-stress-user
[ 42%] Built target dlt_control_common_lib
[ 42%] Built target dlt-example-filetransfer
[ 43%] Linking C executable dlt-example-user-func
Scanning dependencies of target dlt-test-stress-client
[ 44%] Building C object src/tests/CMakeFiles/dlt-test-stress-user.dir/dlt-test-stress-user.c.o
Scanning dependencies of target dlt-test-filetransfer
Scanning dependencies of target dlt-test-non-verbose
[ 44%] Linking C executable dlt-test-init-free
Scanning dependencies of target dlt-test-preregister-context
[ 45%] Linking C executable dlt-test-multi-process
[ 45%] Linking C executable dlt-example-user
[ 47%] Linking C executable dlt-test-stress
[ 47%] Building C object src/tests/CMakeFiles/dlt-test-stress-client.dir/dlt-test-stress-client.c.o
[ 47%] Built target dlt-example-user-func
[ 48%] Building C object src/tests/CMakeFiles/dlt-test-filetransfer.dir/dlt-test-filetransfer.c.o
[ 49%] Building C object src/tests/CMakeFiles/dlt-test-preregister-context.dir/dlt-test-preregister-context.c.o
[ 50%] Building C object src/tests/CMakeFiles/dlt-test-non-verbose.dir/dlt-test-non-verbose.c.o
[ 50%] Built target dlt-example-user
[ 51%] Linking C executable dlt-test-multi-process-client
Scanning dependencies of target dlt_test_receiver
Scanning dependencies of target dlt-test-fork-handler
[ 51%] Built target dlt-test-multi-process
[ 51%] Linking C executable dlt-test-stress-user
[ 52%] Building C object tests/CMakeFiles/dlt_test_receiver.dir/dlt_test_receiver.c.o
[ 52%] Built target dlt-test-stress
[ 52%] Built target dlt-test-init-free
Scanning dependencies of target gtest_dlt_common
[ 52%] Building C object src/tests/CMakeFiles/dlt-test-fork-handler.dir/dlt-test-fork-handler.c.o
[ 53%] Linking C executable dlt-test-preregister-context
[ 53%] Built target dlt-test-multi-process-client
[ 53%] Built target dlt-test-stress-user
Scanning dependencies of target gtest_dlt_user
[ 54%] Building CXX object tests/CMakeFiles/gtest_dlt_common.dir/gtest_dlt_common.cpp.o
Scanning dependencies of target gtest_dlt_daemon
Scanning dependencies of target dlt_env_ll_unit_test
Scanning dependencies of target gtest_dlt_daemon_common
[ 55%] Building CXX object tests/CMakeFiles/gtest_dlt_user.dir/gtest_dlt_user.cpp.o
[ 56%] Linking C executable dlt-test-fork-handler
Scanning dependencies of target logstorage_filepath
[ 57%] Linking C shared library libdlt_daemon.so
[ 57%] Building CXX object tests/CMakeFiles/dlt_env_ll_unit_test.dir/dlt_env_ll_unit_test.cpp.o
[ 58%] Building CXX object tests/components/logstorage/logstorage_filepath/CMakeFiles/logstorage_filepath.dir/logstorage_filepath.cpp.o
[ 58%] Built target dlt-test-preregister-context
[ 59%] Building CXX object tests/CMakeFiles/gtest_dlt_daemon_common.dir/gtest_dlt_daemon_common.cpp.o
[ 59%] Linking CXX executable dlt_test_receiver
[ 59%] Linking C executable dlt-test-non-verbose
[ 59%] Building CXX object tests/CMakeFiles/gtest_dlt_daemon.dir/gtest_dlt_daemon.cpp.o
[ 59%] Linking C executable dlt-test-stress-client
[ 60%] Linking C executable dlt-test-filetransfer
Scanning dependencies of target logstorage_multi_file
[ 60%] Built target dlt-test-fork-handler
Scanning dependencies of target logstorage_one_file
[ 61%] Building CXX object tests/components/logstorage/logstorage_multi_file/CMakeFiles/logstorage_multi_file.dir/logstorage_multi_file.cpp.o
[ 62%] Building CXX object tests/components/logstorage/logstorage_one_file/CMakeFiles/logstorage_one_file.dir/logstorage_one_file.cpp.o
[ 63%] Linking CXX executable logstorage_filepath
[ 63%] Linking C executable dlt-test-user
[ 63%] Built target dlt-test-non-verbose
[ 63%] Built target dlt_daemon
[ 63%] Built target dlt-test-stress-client
[ 63%] Built target dlt-test-filetransfer
[ 63%] Built target dlt_test_receiver
[ 65%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/daemon/dlt-daemon.c.o
[ 65%] Building C object tests/CMakeFiles/gtest_dlt_daemon_common.dir/__/src/daemon/dlt_daemon_common.c.o
Scanning dependencies of target logstorage_max_cache_size
Scanning dependencies of target logstorage_fsync
[ 66%] Linking C executable dlt-daemon
[ 66%] Built target dlt-test-user
[ 67%] Building CXX object tests/components/logstorage/logstorage_fsync/CMakeFiles/logstorage_fsync.dir/logstorage_fsync.cpp.o
Scanning dependencies of target disable_network
[ 67%] Building CXX object tests/components/logstorage/logstorage_max_cache_size/CMakeFiles/logstorage_max_cache_size.dir/logstorage_max_cache_size.cpp.o
[ 67%] Built target logstorage_filepath
[ 67%] Linking CXX executable logstorage_multi_file
[ 68%] Linking CXX executable logstorage_one_file
Scanning dependencies of target gtest_dlt_logd_converter
[ 68%] Building CXX object tests/components/logstorage/disable_network/CMakeFiles/disable_network.dir/disable_network.cpp.o
Scanning dependencies of target dlt-sortbytimestamp
[ 69%] Building CXX object tests/components/logd-converter/CMakeFiles/gtest_dlt_logd_converter.dir/__/__/__/src/android/dlt-logd-converter.cpp.o
[ 69%] Building C object src/console/CMakeFiles/dlt-sortbytimestamp.dir/dlt-sortbytimestamp.c.o
[ 69%] Built target logstorage_multi_file
[ 69%] Built target dlt-daemon
Scanning dependencies of target dlt-control
[ 69%] Built target logstorage_one_file
Scanning dependencies of target dlt-convert
[ 70%] Linking CXX executable logstorage_fsync
[ 71%] Linking CXX executable logstorage_max_cache_size
Scanning dependencies of target dlt-passive-node-ctrl
[ 72%] Building C object src/console/CMakeFiles/dlt-control.dir/dlt-control.c.o
[ 73%] Linking CXX executable disable_network
[ 73%] Building C object src/console/CMakeFiles/dlt-convert.dir/dlt-convert.c.o
[ 74%] Building C object src/console/CMakeFiles/dlt-passive-node-ctrl.dir/dlt-passive-node-ctrl.c.o
[ 74%] Linking C executable dlt-test-client
[ 74%] Built target logstorage_fsync
[ 74%] Built target logstorage_max_cache_size
[ 74%] Built target disable_network
[ 75%] Linking C executable dlt-sortbytimestamp
Scanning dependencies of target dlt-logstorage-ctrl
[ 76%] Building CXX object tests/components/logd-converter/CMakeFiles/gtest_dlt_logd_converter.dir/gtest_dlt_logd_converter.cpp.o
[ 76%] Built target dlt-test-client
Scanning dependencies of target dlt-receive
Scanning dependencies of target gtest_dlt_daemon_offline_log
[ 77%] Building C object src/console/logstorage/CMakeFiles/dlt-logstorage-ctrl.dir/dlt-logstorage-ctrl.c.o
[ 78%] Building CXX object tests/CMakeFiles/gtest_dlt_daemon_offline_log.dir/gtest_dlt_daemon_offline_log.cpp.o
[ 79%] Building C object src/console/CMakeFiles/dlt-receive.dir/dlt-receive.c.o
[ 79%] Linking C executable dlt-passive-node-ctrl
[ 80%] Linking C executable dlt-convert
[ 81%] Linking C executable dlt-control
[ 81%] Built target dlt-sortbytimestamp
Scanning dependencies of target gtest_dlt_daemon_event_handler
[ 81%] Building C object src/console/logstorage/CMakeFiles/dlt-logstorage-ctrl.dir/dlt-logstorage-common.c.o
[ 81%] Built target dlt-convert
[ 81%] Built target dlt-control
[ 82%] Building CXX object tests/CMakeFiles/gtest_dlt_daemon_event_handler.dir/gtest_dlt_daemon_event_handler.cpp.o
[ 82%] Built target dlt-passive-node-ctrl
[ 83%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/daemon/dlt_daemon_client.c.o
Scanning dependencies of target gtest_dlt_daemon_gateway
Scanning dependencies of target gtest_dlt_daemon_multiple_files_logging
[ 84%] Building CXX object tests/CMakeFiles/gtest_dlt_daemon_gateway.dir/gtest_dlt_daemon_gateway.cpp.o
[ 84%] Building CXX object tests/CMakeFiles/gtest_dlt_daemon_multiple_files_logging.dir/gtest_dlt_daemon_multiple_files_logging.cpp.o
[ 85%] Building C object src/console/logstorage/CMakeFiles/dlt-logstorage-ctrl.dir/dlt-logstorage-list.c.o
[ 85%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/daemon/dlt_daemon_common.c.o
[ 86%] Linking C executable dlt-receive
[ 87%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/daemon/dlt_daemon_connection.c.o
[ 88%] Building C object src/console/logstorage/CMakeFiles/dlt-logstorage-ctrl.dir/__/dlt-control-common.c.o
[ 88%] Built target dlt-receive
[ 89%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/daemon/dlt_daemon_event_handler.c.o
[ 89%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/daemon/dlt_daemon_offline_logstorage.c.o
[ 90%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/daemon/dlt_daemon_serial.c.o
[ 91%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/daemon/dlt_daemon_socket.c.o
[ 91%] Linking C executable dlt-logstorage-ctrl
[ 91%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/daemon/dlt_daemon_unix_socket.c.o
[ 91%] Built target dlt-logstorage-ctrl
[ 92%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/gateway/dlt_gateway.c.o
[ 93%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/offlinelogstorage/dlt_offline_logstorage_behavior.c.o
[ 93%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/offlinelogstorage/dlt_offline_logstorage.c.o
[ 94%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/shared/dlt_config_file_parser.c.o
[ 95%] Building C object tests/CMakeFiles/gtest_dlt_daemon.dir/__/src/shared/dlt_offline_trace.c.o
[ 95%] Linking CXX executable gtest_dlt_daemon
[ 95%] Built target gtest_dlt_daemon
[ 96%] Linking CXX executable gtest_dlt_daemon_multiple_files_logging
[ 96%] Built target gtest_dlt_daemon_multiple_files_logging
[ 96%] Linking CXX executable gtest_dlt_daemon_event_handler
[ 97%] Linking CXX executable gtest_dlt_daemon_gateway
[ 97%] Built target gtest_dlt_daemon_event_handler
[ 97%] Built target gtest_dlt_daemon_gateway
[ 97%] Linking CXX executable gtest_dlt_logd_converter
[ 98%] Linking CXX executable dlt_env_ll_unit_test
[ 98%] Built target gtest_dlt_logd_converter
[ 98%] Built target dlt_env_ll_unit_test
[ 98%] Linking CXX executable gtest_dlt_daemon_common
[ 98%] Built target gtest_dlt_daemon_common
[ 98%] Linking CXX executable gtest_dlt_daemon_offline_log
[ 98%] Built target gtest_dlt_daemon_offline_log
[ 99%] Linking CXX executable gtest_dlt_common
[ 99%] Built target gtest_dlt_common
[100%] Linking CXX executable gtest_dlt_user
[100%] Built target gtest_dlt_user

@minminlittleshrimp
Copy link
Collaborator

Close as it is not recommended to use strcpy and strcat in modern C standard.
More warnings will come with string cumbersome handling.

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

Successfully merging this pull request may close these issues.

4 participants