EnterpriseDB/repmgr

Source code install on Oracle Linux 8 : Got warning warning: ‘strncpy’ specified bound depends on the length of the source argumen

Opened this issue · 0 comments

Hi Guys,

am install the repmgr version 5.3.3 (Source code base) on ORACLE LINUX 8.7:

Make command got WARNING as below:

In function ‘tablespace_data_append.isra.6’,
inlined from ‘get_tablespace_data_barman’ at repmgr-action-standby.c:7844:3,
inlined from ‘run_file_backup’ at repmgr-action-standby.c:7271:8,
inlined from ‘do_standby_clone’ at repmgr-action-standby.c:722:8:
repmgr-action-standby.c:7989:2: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
strncpy(cell->oid, oid, oid_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
repmgr-action-standby.c: In function ‘do_standby_clone’:
repmgr-action-standby.c:7974:16: note: length computed here
int oid_len = strlen(oid);
^~~~~~~~~~~
In function ‘tablespace_data_append.isra.6’,
inlined from ‘get_tablespace_data_barman’ at repmgr-action-standby.c:7844:3,
inlined from ‘run_file_backup’ at repmgr-action-standby.c:7271:8,
inlined from ‘do_standby_clone’ at repmgr-action-standby.c:722:8:
repmgr-action-standby.c:7990:2: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
strncpy(cell->name, name, name_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
repmgr-action-standby.c: In function ‘do_standby_clone’:
repmgr-action-standby.c:7975:17: note: length computed here
int name_len = strlen(name);
^~~~~~~~~~~~
In function ‘tablespace_data_append.isra.6’,
inlined from ‘get_tablespace_data_barman’ at repmgr-action-standby.c:7844:3,
inlined from ‘run_file_backup’ at repmgr-action-standby.c:7271:8,
inlined from ‘do_standby_clone’ at repmgr-action-standby.c:722:8:
repmgr-action-standby.c:7991:2: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
strncpy(cell->location, location, location_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
repmgr-action-standby.c: In function ‘do_standby_clone’:
repmgr-action-standby.c:7976:21: note: length computed here
int location_len = strlen(location);
^~~~~~~~~~~~~~~~

How can I fix it ? or Can I ignore it ?

Thanks
Jason