https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79855

--- Comment #5 from Roland Illig <roland.illig at gmx dot de> ---
Here is a simple program to check the help strings for consistency:

#include <stdio.h>
#include <string.h>

static void assert_trailing_dot(const char *help)
{
        size_t len = strlen(help);
        if (len > 0 && help[len-1] != '.') {
                fprintf(stderr, "missing trailing period in \"%s\".\n", help);
        }
}

int main(void)
{
#define DEFPARAM(enumval, name, help, defval, min, max)
assert_trailing_dot(help);
#define DEFPARAMENUM5(...)
#include "params.def"
}

Compile it with "gcc -Wall -Wextra -std=c99".

Reply via email to