[OpenSIPS-Devel] Compilation issues
Dan Pascu
dan at ag-projects.com
Thu May 30 07:39:16 EDT 2019
On 30 May 2019, at 14:24, Bogdan-Andrei Iancu wrote:
> :(....again what compiler version are you using ? it might be simpler to try to reproduce those warnings.
>
gcc (Debian 8.3.0-2) 8.3.0
> Thanks,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
> https://www.opensips-solutions.com
> OpenSIPS Summit 2019
> https://www.opensips.org/events/Summit-2019Amsterdam/
>
> On 05/29/2019 07:37 PM, Dan Pascu wrote:
>> On 29 May 2019, at 17:29, Bogdan-Andrei Iancu wrote:
>>
>>> Thanks Dan,
>>>
>>> Fixes are pushed, hopefully we managed to get rid of them. If you could give it a try please.
>>>
>> Compiling on 32 bit comes out clean, but many of the warnings are still present when compiling on 64 bit:
>>
>> ---------------------------------------------------------------------
>>
>> In file included from esl/src/esl_config.c:34:
>> esl/src/esl_config.c: In function ‘esl_config_open_file’:
>> esl/src/include/esl.h:43:37: warning: ‘strncpy’ output may be truncated copying 1023 bytes from a string of length 1023 [-Wstringop-truncation]
>> #define esl_copy_string(_x, _y, _z) strncpy(_x, _y, _z - 1)
>> ^~~~~~~~~~~~~~~~~~~~~~~
>> esl/src/include/esl.h:44:32: note: in expansion of macro ‘esl_copy_string’
>> #define esl_set_string(_x, _y) esl_copy_string(_x, _y, sizeof(_x))
>> ^~~~~~~~~~~~~~~
>> esl/src/esl_config.c:72:4: note: in expansion of macro ‘esl_set_string’
>> esl_set_string(cfg->path, path);
>> ^~~~~~~~~~~~~~
>>
>>
>> xjab_wlist.c: In function ‘xj_wlist_set_aliases’:
>> xjab_wlist.c:473:3: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
>> strncpy(p0, pa, i);
>> ^~~~~~~~~~~~~~~~~~
>> xjab_wlist.c:455:34: note: length computed here
>> i = jwl->aliases->proxy->len = strlen(pa);
>> ^~~~~~~~~~
>>
>>
>> iniparser.c: In function ‘iniparser_add_entry’:
>> iniparser.c:568:4: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
>> strncpy(longkey, sec, len + 1);
>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> iniparser.c:565:17: note: length computed here
>> size_t len = strlen(sec);
>> ^~~~~~~~~~~
>>
>>
>> bdb_recover.c: In function ‘create_table’:
>> bdb_recover.c:793:2: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
>> strncpy(tp->name, _s, i);
>> ^~~~~~~~~~~~~~~~~~~~~~~~
>> bdb_recover.c:791:4: note: length computed here
>> i=strlen(_s)+1;
>> ^~~~~~~~~~
>>
>>
>> ---------------------------------------------------------------------
>>
>>
>> --
>> Dan
>>
>>
>>
>>
>
--
Dan
More information about the Devel
mailing list