Skip to content

Compile failure on Debian 11 #9

@coppice-git

Description

@coppice-git

Compiling the current repo code for fretdm with the current repo code for freeswitch fails with the following error:

CC src/libfreetdm_la-ftdm_io.lo
In file included from src/ftdm_io.c:40:
src/ftdm_io.c: In function ‘ftdm_channel_clear_token’:
./src/include/private/ftdm_core.h:134:33: error: ‘strncpy’ output may be truncated copying 127 bytes from a string of length 1279 [-Werror=stringop-truncation]
134 | #define ftdm_copy_string(x,y,z) strncpy(x, y, z - 1)
| ^~~~~~~~~~~~~~~~~~~~
src/ftdm_io.c:1338:5: note: in expansion of macro ‘ftdm_copy_string’
1338 | ftdm_copy_string(ftdmchan->tokens[ftdmchan->token_count], tokens[i], sizeof(ftdmchan->tokens[ftdmchan->token_count]));
| ^~~~~~~~~~~~~~~~

Its really a warning, but the build files treat warnings as errors, so the compile fails. I haven't yet investigated to see what is really going on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions