Skip to content

Awk Warnings for how parameter #4

Description

@DanRStevens

When running make a large number of warnings are generated by the ./libxlibtrace-functions.h.sh script.
Warnings are of the form:

awk: cmd. line:84: (FILENAME=- FNR=2911) warning: gensub: third argument `' treated as 1

Documentation:
Gawk String Manipulation Functions

According to the documentation for the gensub function, the third argument is how. When set to "g" it will do a global replace, otherwise it marks which match should be replaced. When the argument is negative (or absent as in the code), it appears to default to a value of "1" (replace the first occurrence).

These warnings can be silenced by passing "1" instead of an empty string "".

This change would produce a merge conflict with #2.


Edit: These warnings are seen on Ubuntu 20.04. When experimenting with older versions of Ubuntu, the project was able to compile without warnings or errors (with #2 and #3 applied).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions