Skip to content

isup, mtp3: Some functions have char* arguments that could be const char* #4

@InterLinked1

Description

@InterLinked1

We should be using const char* for arguments whenever possible.

Otherwise, applications may need to cast arguments to char*.

As an example:

chan_dahdi.c: In function ‘process_dahdi’:
chan_dahdi.c:19938:100: error: passing argument 2 of ‘ss7_set_isup_timer’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
19938 |                                 } else if (!ss7_set_isup_timer(link->ss7.ss7, strstr(v->name, ".") + 1, atoi(v->value))) {

chan_dahdi.c:19950:100: error: passing argument 2 of ‘ss7_set_mtp3_timer’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
19950 |                                 } else if (!ss7_set_mtp3_timer(link->ss7.ss7, strstr(v->name, ".") + 1, atoi(v->value))) {
      |                                                        

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