zvbi-0.2.42-1.fc42

List of Findings

Error: COMPILER_WARNING: [#def1]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c: scope_hint: In function ‘open_minicut_file’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:1158:9: warning[-Wuse-after-free]: pointer ‘buf_56’ used after ‘free’
# 1158 |         log_message (verb, /* print_errno */ TRUE, templ , ##args)
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:1412:9: note: call to ‘free’ here
# 1412 |         free (buf);
#      |         ^~~~~~~~~~
# 1156|   
# 1157|   #define log_errno(verb, templ, args...) \
# 1158|-> 	log_message (verb, /* print_errno */ TRUE, templ , ##args)
# 1159|   
# 1160|   #define bug(templ, args...) \

Error: COMPILER_WARNING (CWE-457): [#def2]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:2925:31: warning[-Wmaybe-uninitialized]: ‘window_rows’ may be used uninitialized
# 2925 |                  (window_rows - 1) * sizeof (ch->buffer[0][0]));
#      |                  ~~~~~~~~~~~~~^~~~
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c: scope_hint: In function ‘decode_cc_data.part.0’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:2835:22: note: ‘window_rows’ was declared here
# 2835 |         unsigned int window_rows;
#      |                      ^~~~~~~~~~~
# 2923|   	memmove (ch->buffer[curr_buffer][first_row],
# 2924|   		 ch->buffer[curr_buffer][first_row + 1],
# 2925|-> 		 (window_rows - 1) * sizeof (ch->buffer[0][0]));
# 2926|   
# 2927|   	ch->dirty[curr_buffer] >>= 1;

Error: CPPCHECK_WARNING (CWE-457): [#def3]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:4693: warning[uninitvar]: Uninitialized variable: ucs2_str
# 4691|   
# 4692|   		vbi_fputs_iconv_ucs2 (fp, locale_codeset,
# 4693|-> 				      ucs2_str, dw->column_count,
# 4694|   				      /* repl_char */ '?');
# 4695|   		fputs ("'\n", fp);

Error: COMPILER_WARNING (CWE-457): [#def4]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:5457:33: warning[-Wmaybe-uninitialized]: ‘mask’ may be used uninitialized
# 5457 |                 dw->streamed &= ~mask;
#      |                                 ^~~~~
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c: scope_hint: In function ‘dtvcc_decode_packet.isra.0’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:5417:22: note: ‘mask’ was declared here
# 5417 |         unsigned int mask;
#      |                      ^~~~
# 5455|   
# 5456|   	if (0 != dw->buffer[row][column]) {
# 5457|-> 		dw->streamed &= ~mask;
# 5458|   		dw->buffer[row][column] = 0;
# 5459|   	}

Error: COMPILER_WARNING (CWE-457): [#def5]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:5511:25: warning[-Wmaybe-uninitialized]: ‘mask’ may be used uninitialized
# 5511 |         dw->streamed &= ~mask;
#      |                         ^~~~~
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c: scope_hint: In function ‘dtvcc_decode_packet.isra.0’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:5474:22: note: ‘mask’ was declared here
# 5474 |         unsigned int mask;
#      |                      ^~~~
# 5509|   	}
# 5510|   
# 5511|-> 	dw->streamed &= ~mask;
# 5512|   
# 5513|   	return TRUE;

Error: CPPCHECK_WARNING (CWE-758): [#def6]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:6234: error[shiftTooManyBits]: Shifting 32-bit value by 56 bits is undefined behaviour
# 6232|   			pts = 0;
# 6233|   			for (i = 0; i < 8; ++i) {
# 6234|-> 				pts |= buffer[i] << (56 - i * 8);
# 6235|   			}
# 6236|   			decode_cc_data (pr, pts, &buffer[8], actual);

Error: CPPCHECK_WARNING (CWE-758): [#def7]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:6449: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 6447|   			c = i << 24;
# 6448|   			for (j = 0; j < 8; ++j) {
# 6449|-> 				if (c & (1 << 31))
# 6450|   					c = (c << 1) ^ poly;
# 6451|   				else

Error: COMPILER_WARNING (CWE-569): [#def8]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c: scope_hint: In function ‘same_transponder’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:7851:43: warning[-Wtautological-compare]: self-comparison always evaluates to false
# 7851 |                 if (s1->u.atsc.modulation != s1->u.atsc.modulation)
#      |                                           ^~
# 7849|   	switch (s1->type) {
# 7850|   	case FE_ATSC:
# 7851|-> 		if (s1->u.atsc.modulation != s1->u.atsc.modulation)
# 7852|   			return FALSE;
# 7853|   		break;

Error: COMPILER_WARNING (CWE-1164): [#def9]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c: scope_hint: In function ‘parse_time’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/atsc-cc.c:9504:1: warning[-Wunused-label]: label ‘dangit’ defined but not used
# 9504 | dangit:
#      | ^~~~~~
# 9502|   invalid:
# 9503|   	error_exit ("Invalid date format '%s'\n", s);
# 9504|-> dangit:
# 9505|   	error_exit ("Cannot parse dates, sorry.\n");
# 9506|   }

Error: COMPILER_WARNING (CWE-1164): [#def10]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c: scope_hint: At top level
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:160:12: warning[-Wunused-function]: ‘decode’ defined but not used
#  160 | static int decode(unsigned char *vbiline)
#      |            ^~~~~~
#  158|   }
#  159|   
#  160|-> static int decode(unsigned char *vbiline)
#  161|   {
#  162|       int max[7], min[7], val[7], i, clk, tmp, sample, packedbits = 0;

Error: COMPILER_WARNING (CWE-563): [#def11]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c: scope_hint: In function ‘CCdecode’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:555:21: warning[-Wunused-but-set-variable]: variable ‘row’ set but not used
#  555 |         int b1, b2, row, x,y;
#      |                     ^~~
#  553|   static int CCdecode(int data)
#  554|   {
#  555|-> 	int b1, b2, row, x,y;
#  556|   
#  557|   	if (cur_ch[field] < 0)

Error: COMPILER_WARNING (CWE-483): [#def12]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c: scope_hint: In function ‘print_raw’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:725:11: warning[-Wmisleading-indentation]: this ‘if’ clause does not guard...
#  725 |           if ( ( b2 >= 0x20 ) && ( b2 <= 0x7F ) )
#      |           ^~
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:727:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
#  727 |             fflush(stderr);
#      |             ^~~~~~
#  723|   	// a control code.
#  724|   	if ( ( b1 >= 0x10 ) && ( b1 <= 0x1F ) ) {
#  725|-> 	  if ( ( b2 >= 0x20 ) && ( b2 <= 0x7F ) ) 
#  726|   	    fprintf(stderr,"[%02X-%02X]",b1,b2); 
#  727|   	    fflush(stderr);

Error: COMPILER_WARNING (CWE-483): [#def13]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c: scope_hint: In function ‘check_fread’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:1059:17: warning[-Wmisleading-indentation]: this ‘if’ clause does not guard...
# 1059 |                 if (ferror (stdin))
#      |                 ^~
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:1061:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
# 1061 |                         exit (EXIT_FAILURE);
#      |                         ^~~~
# 1057|   {
# 1058|   	if (n_expected_items != n_actual_items) {
# 1059|-> 		if (ferror (stdin))
# 1060|   			fprintf (stderr, "Error reading stream\n");
# 1061|   			exit (EXIT_FAILURE);

Error: COMPILER_WARNING (CWE-563): [#def14]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c: scope_hint: In function ‘read_test_stream’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:1071:16: warning[-Wunused-but-set-variable]: variable ‘dt’ set but not used
# 1071 |         double dt;
#      |                ^~
# 1069|   {
# 1070|   	char buf[256];
# 1071|-> 	double dt;
# 1072|   	unsigned int n_items;
# 1073|   	vbi_sliced *s;

Error: COMPILER_WARNING (CWE-563): [#def15]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:1348:18: warning[-Wunused-variable]: unused variable ‘buf’
# 1348 |    unsigned char buf[65536];
#      |                  ^~~
# 1346|   int main(int argc,char **argv)
# 1347|   {
# 1348|->    unsigned char buf[65536];
# 1349|      int arg;
# 1350|      int args=0;

Error: COMPILER_WARNING (CWE-563): [#def16]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:1349:8: warning[-Wunused-variable]: unused variable ‘arg’
# 1349 |    int arg;
#      |        ^~~
# 1347|   {
# 1348|      unsigned char buf[65536];
# 1349|->    int arg;
# 1350|      int args=0;
# 1351|      fd_set rfds;

Error: COMPILER_WARNING (CWE-563): [#def17]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:1350:8: warning[-Wunused-variable]: unused variable ‘args’
# 1350 |    int args=0;
#      |        ^~~~
# 1348|      unsigned char buf[65536];
# 1349|      int arg;
# 1350|->    int args=0;
# 1351|      fd_set rfds;
# 1352|      int x;

Error: COMPILER_WARNING (CWE-563): [#def18]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:1351:11: warning[-Wunused-variable]: unused variable ‘rfds’
# 1351 |    fd_set rfds;
#      |           ^~~~
# 1349|      int arg;
# 1350|      int args=0;
# 1351|->    fd_set rfds;
# 1352|      int x;
# 1353|   	const char *device_file_name;

Error: COMPILER_WARNING (CWE-563): [#def19]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c: scope_hint: In function ‘main’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:1358:18: warning[-Wunused-but-set-variable]: variable ‘use_cc_filter’ set but not used
# 1358 |         vbi_bool use_cc_filter;
#      |                  ^~~~~~~~~~~~~
# 1356|   	int verbose;
# 1357|   	int have_xds_filter_option;
# 1358|-> 	vbi_bool use_cc_filter;
# 1359|   	unsigned int i;
# 1360|   	unsigned int channels;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def20]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c: scope_hint: In function ‘main’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:1599:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘cap’
# 1597|   	   src_h = 50;
# 1598|      } else {
# 1599|-> 	   par = vbi_capture_parameters (cap);
# 1600|   	   assert (NULL != par);
# 1601|   

Error: COMPILER_WARNING (CWE-457): [#def21]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c: scope_hint: In function ‘main’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:1599:18: warning[-Wmaybe-uninitialized]: ‘cap’ may be used uninitialized
# 1599 |            par = vbi_capture_parameters (cap);
#      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:1364:17: note: ‘cap’ was declared here
# 1364 |    vbi_capture *cap;
#      |                 ^~~
# 1597|   	   src_h = 50;
# 1598|      } else {
# 1599|-> 	   par = vbi_capture_parameters (cap);
# 1600|   	   assert (NULL != par);
# 1601|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def22]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:1675:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘cap’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/ntsc-cc.c:44: included_from: Included from here.
# 1673|   			r = read_test_stream (sliced, &n_lines, src_h);
# 1674|   		} else {
# 1675|-> 			r = vbi_capture_read (cap, raw, sliced,
# 1676|   					      &n_lines, &timestamp, &timeout);
# 1677|   		}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def23]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/x11font.c: scope_hint: In function ‘print_head’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/x11font.c:13:5: warning[-Wanalyzer-null-argument]: use of NULL ‘fp’ where non-null expected
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:32: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:28: included_from: Included from here.
/usr/include/stdio.h:357:12: note: argument 1 of ‘fprintf’ must be non-null
#   11|   		       int width, int height)
#   12|   {
#   13|->     fprintf(fp,
#   14|   	    "STARTFONT 2.1\n"
#   15|   	    "FONT -%s-%s-Medium-%s-Normal--%d-%d-75-75-C-%d-ISO10646-1\n"

Error: COMPILER_WARNING (CWE-681): [#def24]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/x11font.c: scope_hint: In function ‘main’
zvbi-0.2.42-build/zvbi-0.2.42/contrib/x11font.c:129:48: warning[-Wpointer-sign]: pointer targets in passing argument 5 of ‘print_font’ differ in signedness
#  129 |     print_font("caption.bdf","Ets","Caption",0,ccfont2_bits,
#      |                                                ^~~~~~~~~~~~
#      |                                                |
#      |                                                char *
zvbi-0.2.42-build/zvbi-0.2.42/contrib/x11font.c:57:21: note: expected ‘uint8_t *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
#   57 |            uint8_t *font, int cw, int ch, int cpl, int hs,
#      |            ~~~~~~~~~^~~~
#  127|       print_font("teletext4i.bdf","Ets","Teletext",1,wstfont2_bits,
#  128|   	       TCW,TCH,TCPL,4,1449,unicode_wstfont2,357);
#  129|->     print_font("caption.bdf","Ets","Caption",0,ccfont2_bits,
#  130|   	       CCW,CCH,CCPL,1,120,unicode_ccfont2,15);
#  131|       print_font("captioni.bdf","Ets","Caption",1,ccfont2_bits,

Error: COMPILER_WARNING (CWE-681): [#def25]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/x11font.c:131:49: warning[-Wpointer-sign]: pointer targets in passing argument 5 of ‘print_font’ differ in signedness
#  131 |     print_font("captioni.bdf","Ets","Caption",1,ccfont2_bits,
#      |                                                 ^~~~~~~~~~~~
#      |                                                 |
#      |                                                 char *
zvbi-0.2.42-build/zvbi-0.2.42/contrib/x11font.c:57:21: note: expected ‘uint8_t *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
#   57 |            uint8_t *font, int cw, int ch, int cpl, int hs,
#      |            ~~~~~~~~~^~~~
#  129|       print_font("caption.bdf","Ets","Caption",0,ccfont2_bits,
#  130|   	       CCW,CCH,CCPL,1,120,unicode_ccfont2,15);
#  131|->     print_font("captioni.bdf","Ets","Caption",1,ccfont2_bits,
#  132|   	       CCW,CCH,CCPL,1,120,unicode_ccfont2,15 + 4 * 32);
#  133|       return 0;

Error: COMPILER_WARNING: [#def26]
zvbi-0.2.42-build/zvbi-0.2.42/daemon/chains.c:48:19: warning[-Wunused-const-variable=]: ‘rcsid’ defined but not used
#   48 | static const char rcsid[] = "$Id: chains.c,v 1.4 2008-07-26 06:22:28 mschimek Exp $";
#      |                   ^~~~~
#   46|    */
#   47|   
#   48|-> static const char rcsid[] = "$Id: chains.c,v 1.4 2008-07-26 06:22:28 mschimek Exp $";
#   49|   
#   50|   #include "config.h"

Error: COMPILER_WARNING (CWE-563): [#def27]
zvbi-0.2.42-build/zvbi-0.2.42/daemon/proxyd.c: scope_hint: In function ‘vbi_proxyd_get_token_owner’
zvbi-0.2.42-build/zvbi-0.2.42/daemon/proxyd.c:1218:18: warning[-Wunused-but-set-variable]: variable ‘p_proxy_dev’ set but not used
# 1218 |    PROXY_DEV   * p_proxy_dev;
#      |                  ^~~~~~~~~~~
# 1216|   static PROXY_CLNT * vbi_proxyd_get_token_owner( int dev_idx )
# 1217|   {
# 1218|->    PROXY_DEV   * p_proxy_dev;
# 1219|      PROXY_CLNT  * p_walk;
# 1220|      PROXY_CLNT  * p_owner;

Error: COMPILER_WARNING (CWE-563): [#def28]
zvbi-0.2.42-build/zvbi-0.2.42/daemon/proxyd.c: scope_hint: In function ‘vbi_proxyd_channel_schedule’
zvbi-0.2.42-build/zvbi-0.2.42/daemon/proxyd.c:1415:18: warning[-Wunused-but-set-variable]: variable ‘p_proxy_dev’ set but not used
# 1415 |    PROXY_DEV   * p_proxy_dev;
#      |                  ^~~~~~~~~~~
# 1413|      PROXY_CLNT  * p_sched;
# 1414|      PROXY_CLNT  * p_active;
# 1415|->    PROXY_DEV   * p_proxy_dev;
# 1416|      time_t        now;
# 1417|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
zvbi-0.2.42-build/zvbi-0.2.42/daemon/proxyd.c: scope_hint: In function ‘vbi_proxyd_init’
zvbi-0.2.42-build/zvbi-0.2.42/daemon/proxyd.c:2708:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup(1)’
zvbi-0.2.42-build/zvbi-0.2.42/daemon/proxyd.c:3143:4: note: in expansion of macro ‘dprintf’
# 2706|            open("/dev/null", O_WRONLY, 0);
# 2707|            close(2);
# 2708|->          if (dup(1) == -1)
# 2709|                exit(1);
# 2710|   

Error: COMPILER_WARNING: [#def30]
zvbi-0.2.42-build/zvbi-0.2.42/examples/pdc2.c:219:1: warning[-Wunused-const-variable=]: ‘signal_period’ defined but not used
#  219 | signal_period [VBI_MAX_PID_CHANNELS] = {
#      | ^~~~~~~~~~~~~
#  217|   
#  218|   static const double
#  219|-> signal_period [VBI_MAX_PID_CHANNELS] = {
#  220|   	/* EN 300 231 Section 8.3: "In the case of the packet 8/30
#  221|   	   version (Method B) the repetition rate of labels in any

Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c: scope_hint: In function 'delete_all_pages'
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c:1008:30: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cp'
zvbi-0.2.42-build/zvbi-0.2.42/src/dlist.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/cache-priv.h:28: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c:33: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/bcd.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/event.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c:32: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/dlist.h:174:27: note: in expansion of macro 'PARENT'
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c:298:9: note: in expansion of macro 'FOR_ALL_NODES'
zvbi-0.2.42-build/zvbi-0.2.42/src/dlist.h:175:6: note: in definition of macro 'FOR_ALL_NODES'
zvbi-0.2.42-build/zvbi-0.2.42/src/dlist.h:174:27: note: in expansion of macro 'PARENT'
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c:1007:9: note: in expansion of macro 'FOR_ALL_NODES'
zvbi-0.2.42-build/zvbi-0.2.42/src/dlist.h:175:11: note: in expansion of macro 'PARENT'
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c:1007:9: note: in expansion of macro 'FOR_ALL_NODES'
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c:1007:9: note: in expansion of macro 'FOR_ALL_NODES'
zvbi-0.2.42-build/zvbi-0.2.42/src/dlist.h:175:6: note: in definition of macro 'FOR_ALL_NODES'
# 1006|   
# 1007|   	FOR_ALL_NODES (cp, cp1, &ca->priority, pri_node)
# 1008|-> 		if (!cn || cp->network == cn)
# 1009|   			delete_page (ca, cp);
# 1010|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c: scope_hint: In function '_vbi_cache_put_page'
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c:1555:38: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cp'
zvbi-0.2.42-build/zvbi-0.2.42/src/dlist.h:174:27: note: in expansion of macro 'PARENT'
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c:1551:17: note: in expansion of macro 'FOR_ALL_NODES'
zvbi-0.2.42-build/zvbi-0.2.42/src/dlist.h:175:11: note: in expansion of macro 'PARENT'
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c:1551:17: note: in expansion of macro 'FOR_ALL_NODES'
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.c:1551:17: note: in expansion of macro 'FOR_ALL_NODES'
zvbi-0.2.42-build/zvbi-0.2.42/src/dlist.h:175:6: note: in definition of macro 'FOR_ALL_NODES'
# 1553|   				goto replace;
# 1554|   
# 1555|-> 			if (pri != cp->priority
# 1556|   			    || cp->network->ref_count > 0
# 1557|   			    || cp == old_cp)

Error: COMPILER_WARNING (CWE-457): [#def33]
zvbi-0.2.42-build/zvbi-0.2.42/src/cc608_decoder.c:1373:31: warning[-Wmaybe-uninitialized]: 'window_rows' may be used uninitialized
# 1373 |                  (window_rows - 1) * sizeof (ch->buffer[0][0]));
#      |                  ~~~~~~~~~~~~~^~~~
zvbi-0.2.42-build/zvbi-0.2.42/src/cc608_decoder.c: scope_hint: In function '_vbi_cc608_decoder_feed'
zvbi-0.2.42-build/zvbi-0.2.42/src/cc608_decoder.c:1289:22: note: 'window_rows' was declared here
# 1289 |         unsigned int window_rows;
#      |                      ^~~~~~~~~~~
# 1371|   	memmove (ch->buffer[curr_buffer][first_row],
# 1372|   		 ch->buffer[curr_buffer][first_row + 1],
# 1373|-> 		 (window_rows - 1) * sizeof (ch->buffer[0][0]));
# 1374|   
# 1375|   	ch->dirty[curr_buffer] >>= 1;

Error: COMPILER_WARNING: [#def34]
zvbi-0.2.42-build/zvbi-0.2.42/src/conv.c: scope_hint: In function '_vbi_strndup_iconv'
zvbi-0.2.42-build/zvbi-0.2.42/src/conv.c:858:28: warning[-Wnonnull-compare]: 'nonnull' argument 'out_size' compared to NULL
#  858 |                         if (NULL != out_size)
#      |                            ^
#  856|   	} else if (same_codeset (src_codeset, "UCS2")) {
#  857|   		if (NULL != src && 0 != (src_size & 1)) {
#  858|-> 			if (NULL != out_size)
#  859|   				*out_size = 0;
#  860|   			errno = EILSEQ;

Error: COMPILER_WARNING (CWE-563): [#def35]
zvbi-0.2.42-build/zvbi-0.2.42/src/decoder.c: scope_hint: In function 'vbi_raw_decoder_resize'
zvbi-0.2.42-build/zvbi-0.2.42/src/decoder.c:544:25: warning[-Wunused-but-set-variable]: variable 'service_set' set but not used
#  544 |         vbi_service_set service_set;
#      |                         ^~~~~~~~~~~
#  542|   				 unsigned int *		count)
#  543|   {
#  544|-> 	vbi_service_set service_set;
#  545|   	vbi3_raw_decoder *rd3;
#  546|   

Error: COMPILER_WARNING: [#def36]
zvbi-0.2.42-build/zvbi-0.2.42/src/dvb_mux.c:85:27: warning[-Wunused-const-variable=]: 'BT601_525_OFFSET' defined but not used
#   85 | static const unsigned int BT601_525_OFFSET = 858 - 16 - 720;
#      |                           ^~~~~~~~~~~~~~~~
#   83|      For 625/50 systems the numbers are 864, 720 and 12 respectively. */
#   84|   /* vbi_sampling_par->offset just counts samples since 0H. */
#   85|-> static const unsigned int BT601_525_OFFSET = 858 - 16 - 720;
#   86|   static const unsigned int BT601_625_OFFSET = 864 - 12 - 720;
#   87|   

Error: COMPILER_WARNING (CWE-691): [#def37]
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c: scope_hint: In function 'vbi_draw_vt_page_region'
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:645:12: warning[-Wdangling-else]: suggest explicit braces to avoid ambiguous 'else'
#  645 |         if (pg->drcs_clut)
#      |            ^
#  643|   	off = !flash_on;
#  644|   
#  645|-> 	if (pg->drcs_clut)
#  646|   		for (i = 2; i < 2 + 8 + 32; i++)
#  647|                           if (canvas_type == 1)

Error: COMPILER_WARNING (CWE-691): [#def38]
zvbi-0.2.42-build/zvbi-0.2.42/contrib/x11font.c:5: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c: scope_hint: In function ‘vbi_draw_vt_page_region’
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:645:12: warning[-Wdangling-else]: suggest explicit braces to avoid ambiguous ‘else’
#  645 |         if (pg->drcs_clut)
#      |            ^
#  643|   	off = !flash_on;
#  644|   
#  645|-> 	if (pg->drcs_clut)
#  646|   		for (i = 2; i < 2 + 8 + 32; i++)
#  647|                           if (canvas_type == 1)

Error: COMPILER_WARNING (CWE-697): [#def39]
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c: scope_hint: In function 'xpm_export'
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1558:31: warning[-Waddress]: the comparison will always evaluate as 'true' for the address of 'title' will never be NULL
# 1558 |                 if (   ((NULL != title) && (0 != title[0]))
#      |                               ^~
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1482:14: note: 'title' declared here
# 1482 |         char title[80];
#      |              ^~~~~
# 1556|   		footer_size = 3;	/* closing bracket */
# 1557|   
# 1558|->                 if (   ((NULL != title) && (0 != title[0]))
# 1559|                       || ((NULL != e->creator) && (0 != e->creator[0])) ) {
# 1560|   			header_size += 7; /* XPMEXT keyword */

Error: COMPILER_WARNING (CWE-697): [#def40]
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c: scope_hint: In function ‘xpm_export’
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1558:31: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘title’ will never be NULL
# 1558 |                 if (   ((NULL != title) && (0 != title[0]))
#      |                               ^~
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1482:14: note: ‘title’ declared here
# 1482 |         char title[80];
#      |              ^~~~~
# 1556|   		footer_size = 3;	/* closing bracket */
# 1557|   
# 1558|->                 if (   ((NULL != title) && (0 != title[0]))
# 1559|                       || ((NULL != e->creator) && (0 != e->creator[0])) ) {
# 1560|   			header_size += 7; /* XPMEXT keyword */

Error: COMPILER_WARNING (CWE-697): [#def41]
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1562:34: warning[-Waddress]: the comparison will always evaluate as 'true' for the address of 'title' will never be NULL
# 1562 |                         if (NULL != title) {
#      |                                  ^~
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1482:14: note: 'title' declared here
# 1482 |         char title[80];
#      |              ^~~~~
# 1560|   			header_size += 7; /* XPMEXT keyword */
# 1561|   			footer_size += 12; /* XPMENDEXT keyword */
# 1562|-> 			if (NULL != title) {
# 1563|   				/* XPMEXT keywords + label + content */
# 1564|   				footer_size += 17 + strlen (title);

Error: COMPILER_WARNING (CWE-697): [#def42]
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1562:34: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘title’ will never be NULL
# 1562 |                         if (NULL != title) {
#      |                                  ^~
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1482:14: note: ‘title’ declared here
# 1482 |         char title[80];
#      |              ^~~~~
# 1560|   			header_size += 7; /* XPMEXT keyword */
# 1561|   			footer_size += 12; /* XPMENDEXT keyword */
# 1562|-> 			if (NULL != title) {
# 1563|   				/* XPMEXT keywords + label + content */
# 1564|   				footer_size += 17 + strlen (title);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-templ.c: scope_hint: In function 'tmpl_new'
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-templ.c:56:16: warning[-Wanalyzer-malloc-leak]: leak of 'tmpl'
#   54|   	tmpl->counter = 0;
#   55|   
#   56|-> 	return &tmpl->export;
#   57|   }
#   58|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-txt.c: scope_hint: In function 'text_new'
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-txt.c:60:16: warning[-Wanalyzer-malloc-leak]: leak of 'text'
#   58|   		return NULL;
#   59|   
#   60|-> 	return &text->export;
#   61|   }
#   62|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-txt.c: scope_hint: In function 'vbi_print_page_region'
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-txt.c:374:12: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open(format, "UCS-2")'
#  372|   		return 0;
#  373|   
#  374|-> 	if ((cd = iconv_open(format, "UCS-2")) == (iconv_t) -1)
#  375|   		return 0;
#  376|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def46]
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c:784:36: warning[-Wanalyzer-va-arg-type-mismatch]: 'va_arg' expected 'int' but received 'double' for variadic argument 1 of 'args'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
#  782|   
#  783|   	if (strcmp(keyword, "reveal") == 0) {
#  784|-> 		export->reveal = !!va_arg(args, int);
#  785|   	} else if (strcmp(keyword, "network") == 0) {
#  786|   		char *network = va_arg(args, char *);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def47]
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c:786:23: warning[-Wanalyzer-va-arg-type-mismatch]: 'va_arg' expected 'char *' but received 'double' for variadic argument 1 of 'args'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
#  784|   		export->reveal = !!va_arg(args, int);
#  785|   	} else if (strcmp(keyword, "network") == 0) {
#  786|-> 		char *network = va_arg(args, char *);
#  787|   		if (!network || !network[0]) {
#  788|   			if (export->network) {

Error: GCC_ANALYZER_WARNING (CWE-686): [#def48]
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c:786:23: warning[-Wanalyzer-va-arg-type-mismatch]: 'va_arg' expected 'char *' but received 'int' for variadic argument 1 of 'args'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
#  784|   		export->reveal = !!va_arg(args, int);
#  785|   	} else if (strcmp(keyword, "network") == 0) {
#  786|-> 		char *network = va_arg(args, char *);
#  787|   		if (!network || !network[0]) {
#  788|   			if (export->network) {

Error: GCC_ANALYZER_WARNING (CWE-686): [#def49]
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c:796:23: warning[-Wanalyzer-va-arg-type-mismatch]: 'va_arg' expected 'char *' but received 'double' for variadic argument 1 of 'args'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
#  794|   		}
#  795|   	} else if (strcmp(keyword, "creator") == 0) {
#  796|-> 		char *creator = va_arg(args, char *);
#  797|   		if (!vbi_export_strdup(export, &export->creator, creator))
#  798|   			return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-686): [#def50]
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c:796:23: warning[-Wanalyzer-va-arg-type-mismatch]: 'va_arg' expected 'char *' but received 'int' for variadic argument 1 of 'args'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
#  794|   		}
#  795|   	} else if (strcmp(keyword, "creator") == 0) {
#  796|-> 		char *creator = va_arg(args, char *);
#  797|   		if (!vbi_export_strdup(export, &export->creator, creator))
#  798|   			return FALSE;

Error: CPPCHECK_WARNING (CWE-401): [#def51]
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c:1686: error[memleakOnRealloc]: Common realloc mistake: 'data' nulled but not freed upon failure
# 1684|   		/* Let's not waste space. */
# 1685|   		if (e->buffer.capacity - offset >= 256) {
# 1686|-> 			data = realloc (data, offset);
# 1687|   			if (NULL == data)
# 1688|   				data = e->buffer.data;

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def52]
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'xclose'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c:1776:34: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:51:41: note: in definition of macro 'likely'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:51:41: note: in definition of macro 'likely'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c:32: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:51:41: note: in definition of macro 'likely'
# 1774|   
# 1775|   	do {
# 1776|-> 		if (likely (0 == close (fd)))
# 1777|   			return 0;
# 1778|   		if (EINTR != errno)

Error: COMPILER_WARNING (CWE-563): [#def53]
zvbi-0.2.42-build/zvbi-0.2.42/src/idl_demux.c: scope_hint: In function 'idl_a_demux_feed'
zvbi-0.2.42-build/zvbi-0.2.42/src/idl_demux.c:82:22: warning[-Wunused-but-set-variable]: variable 'flags' set but not used
#   82 |         unsigned int flags;
#      |                      ^~~~~
#   80|   	unsigned int dl;	/* data length */
#   81|   	unsigned int crc;
#   82|-> 	unsigned int flags;
#   83|   	unsigned int i;
#   84|   	unsigned int j;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
zvbi-0.2.42-build/zvbi-0.2.42/src/io-dvb.c: scope_hint: In function 'vbi_capture_dvb_new2'
zvbi-0.2.42-build/zvbi-0.2.42/src/io-dvb.c:530:16: warning[-Wanalyzer-malloc-leak]: leak of 'dvb'
zvbi-0.2.42-build/zvbi-0.2.42/src/bcd.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/decoder.h:31: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/io.h:28: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/io-dvb.c:43: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/io-dvb.c:480:15: note: in expansion of macro 'vbi_malloc'
zvbi-0.2.42-build/zvbi-0.2.42/src/io-dvb.c:484:9: note: in expansion of macro 'CLEAR'
zvbi-0.2.42-build/zvbi-0.2.42/src/io-dvb.c:512:9: note: in expansion of macro 'printv'
#  528|   	}
#  529|   
#  530|-> 	return &dvb->capture;
#  531|   
#  532|    no_memory:

Error: COMPILER_WARNING (CWE-483): [#def55]
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l.c: scope_hint: In function 'guess_bttv_v4l'
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l.c:647:25: warning[-Wmisleading-indentation]: this 'if' clause does not guard...
#  647 |                         if (get_videostd(v, given_fd, &mode))
#      |                         ^~
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l.c:649:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
#  649 |                                 goto finish;
#      |                                 ^~~~
#  645|   
#  646|   		if (reverse_lookup(v, given_fd, &vbi_stat)) {
#  647|-> 			if (get_videostd(v, given_fd, &mode))
#  648|                                   v->fd_video = given_fd;
#  649|   				goto finish;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2.c: scope_hint: In function 'vbi_capture_v4l2_new'
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2.c:152:24: warning[-Wanalyzer-malloc-leak]: leak of 'v'
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2.c:38: included_from: Included from here.
#  150|   
#  151|   		/* Try V4L2 2.6. */
#  152|-> 		return vbi_capture_v4l2k_new (dev_name, -1, buffers,
#  153|   					      services, strict,
#  154|   					      errstr, trace);

Error: COMPILER_WARNING (CWE-563): [#def57]
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c: scope_hint: In function 'v4l2_stream_alloc'
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c:193:16: warning[-Wunused-but-set-variable]: variable 'guess' set but not used
#  193 |         char * guess = NULL;
#      |                ^~~~~
#  191|   	struct v4l2_requestbuffers vrbuf;
#  192|   	struct v4l2_buffer vbuf;
#  193|-> 	char * guess = NULL;
#  194|           int errno_copy;
#  195|   

Error: COMPILER_WARNING (CWE-563): [#def58]
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c: scope_hint: In function 'v4l2_get_videostd'
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c:755:16: warning[-Wunused-but-set-variable]: variable 'guess' set but not used
#  755 |         char * guess = NULL;
#      |                ^~~~~
#  753|   	unsigned int i;
#  754|   	int r;
#  755|-> 	char * guess = NULL;
#  756|   
#  757|   	if (-1 == xioctl (v, VIDIOC_G_STD, &stdid)) {

Error: COMPILER_WARNING (CWE-563): [#def59]
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c: scope_hint: In function 'v4l2_update_services'
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c:866:16: warning[-Wunused-but-set-variable]: variable 'guess' set but not used
#  866 |         char * guess = NULL;
#      |                ^~~~~
#  864|   	int    g_fmt;
#  865|   	int    s_fmt;
#  866|-> 	char * guess = NULL;
#  867|   
#  868|   	/* suspend capturing, or driver will return EBUSY */

Error: COMPILER_WARNING (CWE-563): [#def60]
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c: scope_hint: In function 'vbi_capture_v4l2k_new'
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c:1316:15: warning[-Wunused-but-set-variable]: variable 'guess' set but not used
# 1316 |         char *guess = NULL;
#      |               ^~~~~
# 1314|   				 vbi_bool		trace)
# 1315|   {
# 1316|-> 	char *guess = NULL;
# 1317|   	char *error = NULL;
# 1318|   	vbi_capture_v4l2 *v;

Error: GCC_ANALYZER_WARNING (CWE-686): [#def61]
zvbi-0.2.42-build/zvbi-0.2.42/src/io.c: scope_hint: In function 'fprint_symbolic'
zvbi-0.2.42-build/zvbi-0.2.42/src/io.c:606:19: warning[-Wanalyzer-va-arg-type-mismatch]: 'va_arg' expected 'long unsigned int' but received 'int' for variadic argument 2 of 'ap'
zvbi-0.2.42-build/zvbi-0.2.42/src/io.c:35: included_from: Included from here.
#  604|   
#  605|   	for (i = 0; (s = va_arg (ap, const char *)); ++i) {
#  606|-> 		v = va_arg (ap, unsigned long);
#  607|   
#  608|   		if (v == value

Error: GCC_ANALYZER_WARNING (CWE-787): [#def62]
zvbi-0.2.42-build/zvbi-0.2.42/src/lang.c: scope_hint: In function 'vbi_teletext_unicode'
zvbi-0.2.42-build/zvbi-0.2.42/src/lang.c:467:41: warning[-Wanalyzer-out-of-bounds]: buffer over-read
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:37: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/bcd.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/lang.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/lang.c:32: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/lang.c:467:41: note: valid subscripts for 'hebrew_g0' are '[0]' to '[36]'
#  465|   			return c;
#  466|   		else
#  467|-> 			return hebrew_g0[c - 0x5B];
#  468|   
#  469|   	case BLOCK_MOSAIC_G1:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:39: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/bcd.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/lang.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:36: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c: scope_hint: In function 'xpm_export'
zvbi-0.2.42-build/zvbi-0.2.42/src/macros.h:83:17: warning[-Wanalyzer-malloc-leak]: leak of 'indexed_image'
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1581:24: note: in expansion of macro 'FALSE'
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1581:24: note: in expansion of macro 'FALSE'
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1581:24: note: in expansion of macro 'FALSE'
#   81|   #endif
#   82|   #ifndef FALSE
#   83|-> #  define FALSE 0
#   84|   #endif
#   85|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:39: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/bcd.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/lang.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:36: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/contrib/x11font.c:5: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c: scope_hint: In function ‘xpm_export’
zvbi-0.2.42-build/zvbi-0.2.42/src/macros.h:83:17: warning[-Wanalyzer-malloc-leak]: leak of ‘indexed_image’
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1581:24: note: in expansion of macro ‘FALSE’
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1581:24: note: in expansion of macro ‘FALSE’
zvbi-0.2.42-build/zvbi-0.2.42/src/exp-gfx.c:1581:24: note: in expansion of macro ‘FALSE’
#   81|   #endif
#   82|   #ifndef FALSE
#   83|-> #  define FALSE 0
#   84|   #endif
#   85|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def65]
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:39: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/bcd.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/export.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c:39: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/macros.h:83:17: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c:777:24: note: in expansion of macro 'FALSE'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c: scope_hint: In function 'vbi_export_option_set'
zvbi-0.2.42-build/zvbi-0.2.42/src/export.c:777:24: note: in expansion of macro 'FALSE'
#   81|   #endif
#   82|   #ifndef FALSE
#   83|-> #  define FALSE 0
#   84|   #endif
#   85|   

Error: COMPILER_WARNING: [#def66]
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c: scope_hint: In function '_vbi_strndup'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c:120:12: warning[-Wnonnull-compare]: 'nonnull' argument 's' compared to NULL
#  120 |         if (NULL == s)
#      |            ^
#  118|   	char *r;
#  119|   
#  120|-> 	if (NULL == s)
#  121|   		return NULL;
#  122|   

Error: CPPCHECK_WARNING (CWE-664): [#def67]
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c:159: error[va_list_usedBeforeStarted]: va_list 'ap2' used before va_start() was called.
#  157|   	size = 64;
#  158|   
#  159|-> 	__va_copy (ap2, ap);
#  160|   
#  161|   	for (;;) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def68]
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c:196:15: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c:217:15: note: in expansion of macro 'vasprintf'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c:166:30: note: in expansion of macro 'vbi_realloc'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c:166:30: note: in expansion of macro 'vbi_realloc'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c:189:9: note: in expansion of macro 'vbi_free'
#  194|   	   asprintf NULLs *dstp, which is safer. */
#  195|   	*dstp = NULL;
#  196|-> 	errno = temp;
#  197|   
#  198|   	return -1;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def69]
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c: scope_hint: In function '_vbi_vasprintf'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c:199:1: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:31: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c:32: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c:166:30: note: in expansion of macro 'vbi_realloc'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c:189:9: note: in expansion of macro 'vbi_free'
#  197|   
#  198|   	return -1;
#  199|-> }
#  200|   
#  201|   /**

Error: COMPILER_WARNING: [#def70]
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c: scope_hint: In function '_vbi_log_vprintf'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.c:402:12: warning[-Wnonnull-compare]: 'nonnull' argument 'log_fn' compared to NULL
#  402 |         if (NULL == log_fn)
#      |            ^
#  400|   	assert (NULL != templ);
#  401|   
#  402|-> 	if (NULL == log_fn)
#  403|   		return;
#  404|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def71]
zvbi-0.2.42-build/zvbi-0.2.42/src/bcd.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-msg.c:137: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:433:19: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'p_tmp' where non-null expected
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-msg.c:1072:19: note: in expansion of macro 'strlcpy'
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-msg.c:1072:19: note: in expansion of macro 'strlcpy'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:439:1: note: argument 1 of '_vbi_strlcpy' must be non-null
#  431|   /* Use this instead of strncpy(). strlcpy() is a BSD extension. */
#  432|   #ifndef HAVE_STRLCPY
#  433|-> #  define strlcpy _vbi_strlcpy
#  434|   #endif
#  435|   #undef strncpy

Error: GCC_ANALYZER_WARNING (CWE-688): [#def72]
zvbi-0.2.42-build/zvbi-0.2.42/src/bcd.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/lang.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.h:30: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/cache-priv.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/teletext_decoder.h:29: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/vbi.h:32: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c:39: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c: scope_hint: In function 'v4l2_get_videostd'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:467:20: warning[-Wanalyzer-null-argument]: use of NULL 'errstr' where non-null expected
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c:758:17: note: in expansion of macro 'asprintf'
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c:48: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/io-v4l2k.c:758:17: note: in expansion of macro 'asprintf'
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:471:1: note: argument 1 of '_vbi_asprintf' must be non-null
#  465|   /* asprintf() is a GNU extension. */
#  466|   #ifndef HAVE_ASPRINTF
#  467|-> #  define asprintf _vbi_asprintf
#  468|   #endif
#  469|   

Error: COMPILER_WARNING (CWE-563): [#def73]
zvbi-0.2.42-build/zvbi-0.2.42/src/packet.c: scope_hint: In function 'parse_28_29'
zvbi-0.2.42-build/zvbi-0.2.42/src/packet.c:1886:36: warning[-Wunused-but-set-variable]: variable 'coding' set but not used
# 1886 |         int designation, function, coding;
#      |                                    ^~~~~~
# 1884|   	    cache_page *cvtp, int mag8, int packet)
# 1885|   {
# 1886|-> 	int designation, function, coding;
# 1887|   	int triplets[13];
# 1888|   	struct bit_stream bs;

Error: COMPILER_WARNING (CWE-563): [#def74]
zvbi-0.2.42-build/zvbi-0.2.42/src/packet.c: scope_hint: In function 'vbi_decode_teletext'
zvbi-0.2.42-build/zvbi-0.2.42/src/packet.c:2195:30: warning[-Wunused-but-set-variable]: variable 'mag' set but not used
# 2195 |         struct ttx_magazine *mag;
#      |                              ^~~
# 2193|   	struct raw_page *rvtp;
# 2194|   	int pmag, mag0, mag8, packet;
# 2195|-> 	struct ttx_magazine *mag;
# 2196|   	uint8_t *p;
# 2197|   

Error: COMPILER_WARNING (CWE-563): [#def75]
zvbi-0.2.42-build/zvbi-0.2.42/src/pdc.c: scope_hint: In function 'vbi_pil_to_time'
zvbi-0.2.42-build/zvbi-0.2.42/src/pdc.c:815:13: warning[-Wunused-but-set-variable]: variable 'saved_errno' set but not used
#  815 |         int saved_errno;
#      |             ^~~~~~~~~~~
#  813|   	char *old_tz;
#  814|   	time_t result;
#  815|-> 	int saved_errno;
#  816|   
#  817|   	if (unlikely (!vbi_pil_is_valid_date (pil))) {

Error: COMPILER_WARNING (CWE-563): [#def76]
zvbi-0.2.42-build/zvbi-0.2.42/src/pdc.c: scope_hint: In function 'vbi_pty_validity_window'
zvbi-0.2.42-build/zvbi-0.2.42/src/pdc.c:1000:13: warning[-Wunused-but-set-variable]: variable 'saved_errno' set but not used
# 1000 |         int saved_errno;
#      |             ^~~~~~~~~~~
#  998|   	struct tm tm;
#  999|   	time_t stop;
# 1000|-> 	int saved_errno;
# 1001|   
# 1002|   	assert (NULL != begin);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def77]
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c: scope_hint: In function 'proxy_client_close.part.0'
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c:52:45: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c:453:7: note: in expansion of macro 'dprintf1'
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c:453:7: note: in expansion of macro 'dprintf1'
#   50|   #ifdef ENABLE_PROXY
#   51|   
#   52|-> #define dprintf1(fmt, arg...)    do {if (vpc->trace >= 1) fprintf(stderr, "proxy-client: " fmt, ## arg);} while(0)
#   53|   #define dprintf2(fmt, arg...)    do {if (vpc->trace >= 2) fprintf(stderr, "proxy-client: " fmt, ## arg);} while(0)
#   54|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def78]
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c: scope_hint: In function 'proxy_client_check_msg'
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c:224:122: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*(VBIPROXY_MSG_HEADER *)pMsg.type'
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c:53:100: note: in definition of macro 'dprintf2'
zvbi-0.2.42-build/zvbi-0.2.42/src/dlist.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/cache-priv.h:28: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/teletext_decoder.h:29: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/vbi.h:32: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c:42: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c:224:4: note: in expansion of macro 'dprintf2'
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c:53:100: note: in definition of macro 'dprintf2'
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c:53:100: note: in definition of macro 'dprintf2'
#  222|   
#  223|      /*if (vpc->p_client_msg->head.type != MSG_TYPE_SLICED_IND) */
#  224|->    dprintf2("check_msg: recv msg type %d, len %d (%s)\n", pHead->type, pHead->len, vbi_proxy_msg_debug_get_type_str(pHead->type));
#  225|   
#  226|      switch (pHead->type)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def79]
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c:226:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*(VBIPROXY_MSG_HEADER *)pMsg.type'
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-client.c:224:4: note: in expansion of macro 'dprintf2'
#  224|      dprintf2("check_msg: recv msg type %d, len %d (%s)\n", pHead->type, pHead->len, vbi_proxy_msg_debug_get_type_str(pHead->type));
#  225|   
#  226|->    switch (pHead->type)
#  227|      {
#  228|         case MSG_TYPE_CONNECT_CNF:

Error: GCC_ANALYZER_WARNING (CWE-688): [#def80]
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-msg.c: scope_hint: In function 'vbi_proxy_msg_get_local_socket_addr'
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-msg.c:789:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'res' where non-null expected
<built-in>: note: argument 1 of '__builtin_memset' must be non-null
#  787|         *ppResult = res;
#  788|   
#  789|->       memset(res, 0, sizeof(*res));
#  790|         res->ai_socktype  = pInParams->ai_socktype;
#  791|         res->ai_family    = pInParams->ai_family;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def81]
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-msg.c:800:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'saddr'
#  798|         strlcpy(saddr->sun_path, pPathName, sizeof(saddr->sun_path) - 1);
#  799|         saddr->sun_path[sizeof(saddr->sun_path) - 1] = 0;
#  800|->       saddr->sun_family = AF_UNIX;
#  801|   
#  802|         return 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def82]
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-msg.c: scope_hint: In function 'vbi_proxy_msg_resolve_symlinks'
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-msg.c:1056:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'p_path' where non-null expected
zvbi-0.2.42-build/zvbi-0.2.42/src/proxy-msg.c:121: included_from: Included from here.
/usr/include/sys/stat.h:313:12: note: argument 1 of 'lstat' must be non-null
# 1054|      for (slink_idx = 0; slink_idx < 100; slink_idx++)
# 1055|      {
# 1056|->       res = lstat(p_path, &stbuf);
# 1057|         if ((res == 0) && S_ISLNK(stbuf.st_mode))
# 1058|         {

Error: COMPILER_WARNING (CWE-563): [#def83]
zvbi-0.2.42-build/zvbi-0.2.42/src/raw_decoder.c: scope_hint: In function 'vbi3_raw_decoder_debug'
zvbi-0.2.42-build/zvbi-0.2.42/src/raw_decoder.c:1108:36: warning[-Wunused-but-set-variable]: variable 'sp_lines' set but not used
# 1108 |         _vbi3_raw_decoder_sp_line *sp_lines;
#      |                                    ^~~~~~~~
# 1106|   				 vbi_bool		enable)
# 1107|   {
# 1108|-> 	_vbi3_raw_decoder_sp_line *sp_lines;
# 1109|   	unsigned int n_lines;
# 1110|   	vbi_bool r;

Error: COMPILER_WARNING (CWE-563): [#def84]
zvbi-0.2.42-build/zvbi-0.2.42/src/sampling_par.c: scope_hint: In function '_vbi_sampling_par_from_services_log'
zvbi-0.2.42-build/zvbi-0.2.42/src/sampling_par.c:484:24: warning[-Wunused-but-set-variable]: variable 'margin' set but not used
#  484 |                 double margin;
#      |                        ^~~~~~
#  482|   
#  483|   	for (par = _vbi_service_table; par->id; ++par) {
#  484|-> 		double margin;
#  485|   		double signal;
#  486|   		int offset;

Error: COMPILER_WARNING: [#def85]
zvbi-0.2.42-build/zvbi-0.2.42/src/search.c:560:1: warning[-Wenum-int-mismatch]: conflicting types for 'vbi_search_next' due to enum/integer mismatch; have 'int(vbi_search *, vbi_page **, int)'
#  560 | vbi_search_next(vbi_search *search, vbi_page **pg, int dir)
#      | ^~~~~~~~~~~~~~~
zvbi-0.2.42-build/zvbi-0.2.42/src/search.c:37: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/search.h:85:26: note: previous declaration of 'vbi_search_next' with type 'vbi_search_status(vbi_search *, vbi_page **, int)'
#   85 | extern vbi_search_status vbi_search_next(vbi_search *search, vbi_page **pg, int dir);
#      |                          ^~~~~~~~~~~~~~~
#  558|   /* XXX fix return type */
#  559|   int
#  560|-> vbi_search_next(vbi_search *search, vbi_page **pg, int dir)
#  561|   {
#  562|   	*pg = NULL;

Error: COMPILER_WARNING (CWE-697): [#def86]
zvbi-0.2.42-build/zvbi-0.2.42/src/trigger.c: scope_hint: In function 'parse_eacem'
zvbi-0.2.42-build/zvbi-0.2.42/src/trigger.c:339:13: warning[-Waddress]: the comparison will always evaluate as 'true' for the address of 'url' will never be NULL
#  339 |         if (!t->link.url)
#      |             ^
zvbi-0.2.42-build/zvbi-0.2.42/src/tables.h:29: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/trigger.c:39: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/event.h:225:41: note: 'url' declared here
#  225 |         signed char                     url[256];
#      |                                         ^~~
#  337|   		/* EACEM eqv PAL/SECAM land, 25 fps */
#  338|   
#  339|-> 	if (!t->link.url)
#  340|   		return NULL;
#  341|   

Error: COMPILER_WARNING (CWE-697): [#def87]
zvbi-0.2.42-build/zvbi-0.2.42/src/trigger.c:350:21: warning[-Waddress]: the comparison will always evaluate as 'true' for the address of 'name' will never be NULL
#  350 |                 if (!t->link.name || t->link.pgno < 0 || t->link.url[7])
#      |                     ^
zvbi-0.2.42-build/zvbi-0.2.42/src/event.h:224:41: note: 'name' declared here
#  224 |         signed char                     name[80];
#      |                                         ^~~~
#  348|   	else if (strncmp((char *) t->link.url, "dummy", 5) == 0) {
#  349|   		t->link.pgno = parse_dec((char *) t->link.url + 5, 2);
#  350|-> 		if (!t->link.name || t->link.pgno < 0 || t->link.url[7])
#  351|   			return NULL;
#  352|   		t->link.type = VBI_LINK_MESSAGE;

Error: COMPILER_WARNING (CWE-697): [#def88]
zvbi-0.2.42-build/zvbi-0.2.42/src/trigger.c: scope_hint: In function 'parse_atvef'
zvbi-0.2.42-build/zvbi-0.2.42/src/trigger.c:550:13: warning[-Waddress]: the comparison will always evaluate as 'true' for the address of 'url' will never be NULL
#  550 |         if (!t->link.url)
#      |             ^
zvbi-0.2.42-build/zvbi-0.2.42/src/event.h:225:41: note: 'url' declared here
#  225 |         signed char                     url[256];
#      |                                         ^~~
#  548|   	}
#  549|   
#  550|-> 	if (!t->link.url)
#  551|   		return NULL;
#  552|   

Error: CPPCHECK_WARNING (CWE-758): [#def89]
zvbi-0.2.42-build/zvbi-0.2.42/src/ure.c:2071: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 2069|   	  fprintf(out, "\\p");
# 2070|   	for (k = h = 0; k < 32; k++) {
# 2071|-> 	  if (sym->props & (1 << k)) {
# 2072|   	    if (h != 0)
# 2073|   	      putc(',', out);

Error: COMPILER_WARNING (CWE-563): [#def90]
zvbi-0.2.42-build/zvbi-0.2.42/src/xds_demux.c: scope_hint: In function 'vbi_xds_demux_reset'
zvbi-0.2.42-build/zvbi-0.2.42/src/xds_demux.c:821:22: warning[-Wunused-but-set-variable]: variable 'n' set but not used
#  821 |         unsigned int n;
#      |                      ^
#  819|   vbi_xds_demux_reset		(vbi_xds_demux *	xd)
#  820|   {
#  821|-> 	unsigned int n;
#  822|   	unsigned int i, j;
#  823|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def91]
zvbi-0.2.42-build/zvbi-0.2.42/test/capture.c: scope_hint: In function ‘load_string’
zvbi-0.2.42-build/zvbi-0.2.42/test/capture.c:533:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(name, "r")’
#  531|   
#  532|   		new_buffer = realloc (buffer, new_size);
#  533|-> 		if (NULL == new_buffer) {
#  534|   			free (buffer);
#  535|   			exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
zvbi-0.2.42-build/zvbi-0.2.42/test/capture.c:533:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(name, "r")’
#  531|   
#  532|   		new_buffer = realloc (buffer, new_size);
#  533|-> 		if (NULL == new_buffer) {
#  534|   			free (buffer);
#  535|   			exit (EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def93]
zvbi-0.2.42-build/zvbi-0.2.42/test/capture.c:541:37: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(name, "r")’
#  539|   		buffer_size = new_size;
#  540|   
#  541|-> 		space = buffer_size - done - 1;
#  542|   		actual = fread (buffer + done, 1, space, fp);
#  543|   		if ((size_t) -1 == actual) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
zvbi-0.2.42-build/zvbi-0.2.42/test/capture.c:541:37: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(name, "r")’
#  539|   		buffer_size = new_size;
#  540|   
#  541|-> 		space = buffer_size - done - 1;
#  542|   		actual = fread (buffer + done, 1, space, fp);
#  543|   		if ((size_t) -1 == actual) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def95]
zvbi-0.2.42-build/zvbi-0.2.42/test/date.c: scope_hint: In function ‘print_time’
zvbi-0.2.42-build/zvbi-0.2.42/test/date.c:70:23: warning[-Wanalyzer-null-argument]: use of NULL ‘buffer’ where non-null expected
/opt/gcc-latest/lib/gcc/x86_64-pc-linux-gnu/15.0.0/include-fixed/pthread.h:32: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/decoder.h:36: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/sampling_par.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/test/sliced.h:32: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/test/date.c:35: included_from: Included from here.
/usr/include/time.h:99:15: note: argument 1 of ‘strftime’ must be non-null
#   68|   	if (lt->seconds_east_valid) {
#   69|   		tm.tm_gmtoff = lt->seconds_east_valid;
#   70|-> 		len = strftime (buffer, buffer_size, "%F %T %Z", &tm);
#   71|   	} else
#   72|   #endif

Error: GCC_ANALYZER_WARNING (CWE-688): [#def96]
zvbi-0.2.42-build/zvbi-0.2.42/test/date.c:74:23: warning[-Wanalyzer-null-argument]: use of NULL ‘buffer’ where non-null expected
/usr/include/time.h:99:15: note: argument 1 of ‘strftime’ must be non-null
#   72|   #endif
#   73|   	{
#   74|-> 		len = strftime (buffer, buffer_size, "%F %T UTC", &tm);
#   75|   	}
#   76|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def97]
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c: scope_hint: In function ‘close_output_file’
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c:145:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘open_output_file(pgno,  subno)’
zvbi-0.2.42-build/zvbi-0.2.42/src/dlist.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/cache-priv.h:28: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/teletext_decoder.h:29: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/vbi.h:32: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c:44: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/bcd.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/lang.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/cache.h:30: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c:40: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c:129:13: note: in expansion of macro ‘asprintf’
#  143|   	FILE *fp;
#  144|   
#  145|-> 	if (NULL == out_file_name_prefix)
#  146|   		return stdout;
#  147|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c:145:18: warning[-Wanalyzer-malloc-leak]: leak of ‘open_output_file(pgno,  subno)’
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c:129:13: note: in expansion of macro ‘asprintf’
#  143|   	FILE *fp;
#  144|   
#  145|-> 	if (NULL == out_file_name_prefix)
#  146|   		return stdout;
#  147|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def99]
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c: scope_hint: In function ‘do_export.part.0’
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c:236:34: warning[-Wanalyzer-null-argument]: use of NULL ‘open_output_file(pgno,  subno)’ where non-null expected
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c:129:13: note: in expansion of macro ‘asprintf’
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c:33: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/misc.h:28: included_from: Included from here.
/usr/include/stdio.h:735:15: note: argument 4 of ‘fwrite’ must be non-null
#  234|   
#  235|   			fp = open_output_file (pgno, subno);
#  236|-> 			if (1 != fwrite (buffer, ssize, 1, fp))
#  237|   				write_error_exit (/* msg: errno */ NULL);
#  238|   			close_output_file (fp);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def100]
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c:258:34: warning[-Wanalyzer-null-argument]: use of NULL ‘open_output_file(pgno,  subno)’ where non-null expected
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c:129:13: note: in expansion of macro ‘asprintf’
/usr/include/stdio.h:735:15: note: argument 4 of ‘fwrite’ must be non-null
#  256|   		if (success) {
#  257|   			fp = open_output_file (pgno, subno);
#  258|-> 			if (1 != fwrite (buffer, size, 1, fp))
#  259|   				write_error_exit (/* msg: errno */ NULL);
#  260|   			close_output_file (fp);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def101]
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c: scope_hint: In function ‘init_export_module’
zvbi-0.2.42-build/zvbi-0.2.42/test/export.c:811:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘vbi_export_info_export(ex)’
#  809|   		char *end = NULL;
#  810|   
#  811|-> 		out_file_name_suffix = strdup (xi->extension);
#  812|   		if (NULL == out_file_name_suffix)
#  813|   			no_mem_exit ();

Error: COMPILER_WARNING: [#def102]
zvbi-0.2.42-build/zvbi-0.2.42/test/proxy-test.c:89:1: warning[-Wunused-const-variable=]: ‘rcsid’ defined but not used
#   89 | rcsid [] = "$Id: proxy-test.c,v 1.21 2008-07-26 06:22:19 mschimek Exp $";
#      | ^~~~~
#   87|   
#   88|   static const char
#   89|-> rcsid [] = "$Id: proxy-test.c,v 1.21 2008-07-26 06:22:19 mschimek Exp $";
#   90|   
#   91|   #ifdef HAVE_CONFIG_H

Error: GCC_ANALYZER_WARNING (CWE-688): [#def103]
zvbi-0.2.42-build/zvbi-0.2.42/test/sliced.c: scope_hint: In function ‘look_ahead’
zvbi-0.2.42-build/zvbi-0.2.42/test/sliced.c:1166:25: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
zvbi-0.2.42-build/zvbi-0.2.42/src/dlist.h:27: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/cache-priv.h:28: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/teletext_decoder.h:29: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/src/vbi.h:32: included_from: Included from here.
zvbi-0.2.42-build/zvbi-0.2.42/test/sliced.c:53: included_from: Included from here.
<built-in>: note: argument 2 of ‘__builtin_memmove’ must be non-null
# 1164|   
# 1165|   		if (n_bytes > (unsigned int)(end - st->bp)) {
# 1166|-> 			memmove (st->buffer, st->bp, available);
# 1167|   
# 1168|   			st->bp = st->buffer;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def104]
zvbi-0.2.42-build/zvbi-0.2.42/test/sliced.c: scope_hint: In function ‘is_old_sliced_format’
zvbi-0.2.42-build/zvbi-0.2.42/test/sliced.c:1181:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘s’
# 1179|   	unsigned int i;
# 1180|   
# 1181|-> 	if ('0' != s[0] || '.' != s[1])
# 1182|   		return FALSE;
# 1183|   

Error: COMPILER_WARNING (CWE-563): [#def105]
zvbi-0.2.42-build/zvbi-0.2.42/test/test-vps.cc: scope_hint: In function ‘void assert_decode_vps_cni(unsigned int*, const uint8_t*)’
zvbi-0.2.42-build/zvbi-0.2.42/test/test-vps.cc:59:22: warning[-Wunused-but-set-variable]: variable ‘cni2’ set but not used
#   59 |         unsigned int cni2;
#      |                      ^~~~
#   57|   {
#   58|   	uint8_t buffer2[13];
#   59|-> 	unsigned int cni2;
#   60|   
#   61|   	memcpy (buffer2, buffer, sizeof (buffer2));

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-242.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namezvbi-0.2.42-1.fc42
store-results-to/tmp/tmphy8x9kty/zvbi-0.2.42-1.fc42.tar.xz
time-created2024-11-13 03:48:29
time-finished2024-11-13 03:51:27
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmphy8x9kty/zvbi-0.2.42-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmphy8x9kty/zvbi-0.2.42-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9