general: reenable -Wpedantic for gcc by using __extension__ (ZEXT)

to suppress warnings about `errtxtf` operand number "%<n>$" args;
  enable some further warnings
test suite: enable -Wpedantic and fix/suppress any warnings
This commit is contained in:
gitlost 2025-01-27 11:03:33 +00:00
parent a4b557786f
commit b377b14360
93 changed files with 1397 additions and 1370 deletions

View file

@ -1,6 +1,6 @@
/*
libzint - the open source barcode library
Copyright (C) 2021-2022 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2021-2025 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@ -175,12 +175,12 @@ static int big5_utf8(struct zint_symbol *symbol, const unsigned char source[], i
static void test_big5_utf8(const testCtx *const p_ctx) {
struct item {
char *data;
const char *data;
int length;
int ret;
int ret_length;
unsigned int expected_b5data[20];
char *comment;
const char *comment;
};
/*
_ U+FF3F fullwidth low line, not in ISO/Win, in Big5 0xA1C4, UTF-8 EFBCBF
@ -207,7 +207,7 @@ static void test_big5_utf8(const testCtx *const p_ctx) {
length = data[i].length == -1 ? (int) strlen(data[i].data) : data[i].length;
ret_length = length;
ret = big5_utf8(&symbol, (unsigned char *) data[i].data, &ret_length, b5data);
ret = big5_utf8(&symbol, TCU(data[i].data), &ret_length, b5data);
assert_equal(ret, data[i].ret, "i:%d ret %d != %d (%s)\n", i, ret, data[i].ret, symbol.errtxt);
if (ret == 0) {
int j;