Marton Szasz created MINIFICPP-1571:
---------------------------------------

             Summary: fix nanofi warnings -Wstringop-truncation (GCC 10+)
                 Key: MINIFICPP-1571
                 URL: https://issues.apache.org/jira/browse/MINIFICPP-1571
             Project: Apache NiFi MiNiFi C++
          Issue Type: Bug
            Reporter: Marton Szasz
            Assignee: Marton Szasz


{color:#000000}In file included from 
{color}{color:#000000}/usr/include/string.h:519{color}{color:#000000}, {color}
from {color:#000000}../thirdparty/ut/uthash.h:29{color}{color:#000000}, {color}
from {color:#000000}../nanofi/include/api/ecu.h:24{color}{color:#000000}, 
{color}
from {color:#000000}../nanofi/src/api/ecu.c:1{color}{color:#000000}: {color}
In function ‘{color:#000000}strncpy{color}{color:#000000}’, {color}
inlined from ‘{color:#000000}get_properties.part.0{color}{color:#000000}’ at 
{color}{color:#000000}../nanofi/src/api/ecu.c:407:5{color}{color:#000000}: 
{color}
{color:#000000}/usr/include/bits/string_fortified.h:95:10:{color} 
{color:#ff54ff}warning: 
{color}{color:#000000}‘{color}{color:#000000}__builtin_strncpy{color}{color:#000000}’
 output truncated before terminating nul copying as many bytes from a string as 
its length [{color}{color:#ff54ff}-Wstringop-truncation{color}{color:#000000}] 
{color}
95 \|   return {color:#ff54ff}__builtin___strncpy_chk (__dest, __src, 
__len,{color} 
   \|          
{color:#ff54ff}^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{color} 
96 \| {color:#ff54ff}                                  __glibc_objsize 
(__dest)){color}{color:#000000}; {color}
   \|                                   
{color:#ff54ff}~~~~~~~~~~~~~~~~~~~~~~~~~{color} 
{color:#000000}../nanofi/src/api/ecu.c:{color}{color:#000000} In function 
‘{color}{color:#000000}get_properties.part.0{color}{color:#000000}’: {color}
{color:#000000}../nanofi/src/api/ecu.c:405:15:{color} {color:#54ffff}note: 
{color}{color:#000000}length computed here {color}
405 \|     int len = {color:#54ffff}strlen(file_path){color}{color:#000000}; 
{color}
    \|               {color:#54ffff}^~~~~~~~~~~~~~~~~{color} 
In file included from 
{color:#000000}/usr/include/string.h:519{color}{color:#000000}, {color}
from {color:#000000}../thirdparty/ut/uthash.h:29{color}{color:#000000}, {color}
from {color:#000000}../nanofi/include/api/ecu.h:24{color}{color:#000000}, 
{color}
from {color:#000000}../nanofi/src/api/ecu.c:1{color}{color:#000000}: {color}
In function ‘{color:#000000}strncpy{color}{color:#000000}’, {color}
inlined from ‘{color:#000000}on_trigger_tailfilechunk{color}{color:#000000}’ at 
{color}{color:#000000}../nanofi/src/api/ecu.c:277:9{color}{color:#000000}: 
{color}
{color:#000000}/usr/include/bits/string_fortified.h:95:10:{color} 
{color:#ff54ff}warning: 
{color}{color:#000000}‘{color}{color:#000000}__builtin_strncpy{color}{color:#000000}’
 output truncated before terminating nul copying as many bytes from a string as 
its length [{color}{color:#ff54ff}-Wstringop-truncation{color}{color:#000000}] 
{color}
95 \|   return {color:#ff54ff}__builtin___strncpy_chk (__dest, __src, 
__len,{color} 
   \|          
{color:#ff54ff}^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{color} 
96 \| {color:#ff54ff}                                  __glibc_objsize 
(__dest)){color}{color:#000000}; {color}
   \|                                   
{color:#ff54ff}~~~~~~~~~~~~~~~~~~~~~~~~~{color} 
{color:#000000}../nanofi/src/api/ecu.c:{color}{color:#000000} In function 
‘{color}{color:#000000}on_trigger_tailfilechunk{color}{color:#000000}’: {color}
{color:#000000}../nanofi/src/api/ecu.c:275:19:{color} {color:#54ffff}note: 
{color}{color:#000000}length computed here {color}
275 \|         int len = 
{color:#54ffff}strlen(file_path){color}{color:#000000}; {color}
    \|                   {color:#54ffff}^~~~~~~~~~~~~~~~~{color}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to