mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
malloc/calloc: check for NULL always (11.1.0 gcc -fanalyzer -c backend/*.c)
ZBarcode_Encode: don't reinit symbol->outfile, props Alonso Schaich frontend/test_args: skip long filename tests on Windows, props Alonso Schaich
This commit is contained in:
@ -352,11 +352,7 @@ static void test_dump_args(int index, int debug) {
|
||||
|
||||
static void test_input(int index, int debug) {
|
||||
|
||||
#ifdef _WIN32
|
||||
#define TEST_INPUT_LONG "test_678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234"
|
||||
#else
|
||||
#define TEST_INPUT_LONG "test_67890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
#endif
|
||||
|
||||
struct item {
|
||||
int b;
|
||||
@ -405,6 +401,12 @@ static void test_input(int index, int debug) {
|
||||
|
||||
if (index != -1 && i != index) continue;
|
||||
if ((debug & ZINT_DEBUG_TEST_PRINT) && !(debug & ZINT_DEBUG_TEST_LESS_NOISY)) printf("i:%d\n", i);
|
||||
#ifdef _WIN32
|
||||
if (data[i].outfile && (int) strlen(data[i].outfile) > 50) {
|
||||
if (debug & ZINT_DEBUG_TEST_PRINT) printf("%d not Windows compatible (outfile length %d > 50)\n", i, (int) strlen(data[i].outfile));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
strcpy(cmd, "zint");
|
||||
if (debug & ZINT_DEBUG_PRINT) {
|
||||
|
Reference in New Issue
Block a user