Coverity-updates archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

New Defects reported by Coverity Scan for NetBSD-amd64-user



Hi,


Please find the latest report on new defect(s) introduced to NetBSD-amd64-user 
found with Coverity Scan.

Defect(s) Reported-by: Coverity Scan
Showing 20 of 88 defect(s)


** CID 270341:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/binutils/dist/binutils/arsup.c: 212 in ar_open()

** CID 274726:  Dereference null return value  (NULL_RETURNS)
/external/gpl3/binutils/dist/gas/config/obj-elf.c: 195 in elf_begin()
/external/gpl3/binutils/dist/gas/config/obj-elf.c: 197 in elf_begin()
/external/gpl3/binutils/dist/gas/config/obj-elf.c: 199 in elf_begin()

** CID 603825:  Improper use of negative value  (NEGATIVE_RETURNS)
/external/gpl3/gdb/dist/gdb/cli/cli-dump.c: 551 in restore_binary_file()

** CID 603826:  Improper use of negative value  (NEGATIVE_RETURNS)
/external/gpl3/gdb/dist/gdb/cli/cli-dump.c: 497 in restore_section_callback()

** CID 604220:  Dereference null return value  (NULL_RETURNS)
/external/gpl3/gdb/dist/gdb/gnu-v2-abi.c: 255 in gnuv2_value_rtti_type()
/external/gpl3/gdb/dist/gdb/gnu-v2-abi.c: 255 in gnuv2_value_rtti_type()

** CID 610391:  Unused pointer value  (UNUSED_VALUE)
/external/gpl3/gdb/dist/gdb/symfile.c: 3864 in _initialize_symfile()

** CID 1001650:  Logically dead code  (DEADCODE)
/external/bsd/bind/dist/lib/irs/getnameinfo.c: 333 in getnameinfo()

** CID 1009289:  Unchecked return value  (CHECKED_RETURN)
/usr.sbin/rpcbind/rpcbind.c: 121 in main()

** CID 1140456:  Explicit null dereferenced  (FORWARD_NULL)
/external/gpl3/gdb/dist/libiberty/cp-demangle.c: 3247 in d_expression_1()
/external/gpl3/gdb/dist/libiberty/cp-demangle.c: 3224 in d_expression_1()

** CID 1224963:  Explicit null dereferenced  (FORWARD_NULL)
/sys/net/bpf.c: 1394 in bpf_deliver()

** CID 1224964:  Overflowed array index read  (INTEGER_OVERFLOW)
/sys/ufs/ufs/ufs_quota2.c: 778 in quota2_handle_cmd_del()

** CID 1224966:  Uninitialized pointer read  (UNINIT)
/sys/net/bpf.c: 1391 in bpf_deliver()

** CID 1225009:  Out-of-bounds access  (ARRAY_VS_SINGLETON)
/tests/lib/libbpfjit/t_bpfjit.c: 70 in atfu_libbpfjit_empty_body()

** CID 1225010:  Unchecked return value from library  (CHECKED_RETURN)
/external/gpl3/gdb/dist/gdb/common/filestuff.c: 258 in mark_cloexec()

** CID 1225011:  Unchecked return value  (CHECKED_RETURN)
/external/gpl3/gdb/dist/gdb/gcore.c: 97 in write_gcore_file()

** CID 1225012:  Unchecked return value from library  (CHECKED_RETURN)
/external/ibm-public/postfix/dist/src/posttls-finger/posttls-finger.c: 849 in 
connect_sock()

** CID 1225013:  Unchecked return value  (CHECKED_RETURN)
/external/ibm-public/postfix/dist/src/tls/tls_session.c: 105 in 
tls_session_stop()

** CID 1225014:  Unchecked return value  (CHECKED_RETURN)
/lib/libutil/sockaddr_snprintf.c: 215 in sockaddr_snprintf()
/lib/libutil/sockaddr_snprintf.c: 227 in sockaddr_snprintf()

** CID 1225015:  Same on both sides  (CONSTANT_EXPRESSION_RESULT)
/external/gpl3/gdb/dist/gdb/frame.c: 594 in frame_id_eq()

** CID 1225016:  Logically dead code  (DEADCODE)
/external/gpl3/gdb/dist/gdb/frame.c: 325 in fprint_frame_id()


________________________________________________________________________________________________________
*** CID 270341:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/binutils/dist/binutils/arsup.c: 212 in ar_open()
206     
207           bfd_set_format (obfd, bfd_archive);
208     
209           obfd->has_armap = 1;
210           obfd->is_thin_archive = 0;
211         }
>>>     CID 270341:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "tname" going out of scope leaks the storage it points to.
212     }
213     
214     static void
215     ar_addlib_doer (bfd *abfd, bfd *prev)
216     {
217       /* Add this module to the output bfd.  */

________________________________________________________________________________________________________
*** CID 274726:  Dereference null return value  (NULL_RETURNS)
/external/gpl3/binutils/dist/gas/config/obj-elf.c: 195 in elf_begin()
189     void
190     elf_begin (void)
191     {
192       asection *s;
193     
194       /* Add symbols for the known sections to the symbol table.  */
>>>     CID 274726:  Dereference null return value  (NULL_RETURNS)
>>>     Assigning: "s" = null return value from "bfd_get_section_by_name(bfd *, 
>>> char const *)".
195       s = bfd_get_section_by_name (stdoutput, TEXT_SECTION_NAME);
196       symbol_table_insert (section_symbol (s));
197       s = bfd_get_section_by_name (stdoutput, DATA_SECTION_NAME);
198       symbol_table_insert (section_symbol (s));
199       s = bfd_get_section_by_name (stdoutput, BSS_SECTION_NAME);
200       symbol_table_insert (section_symbol (s));
/external/gpl3/binutils/dist/gas/config/obj-elf.c: 197 in elf_begin()
191     {
192       asection *s;
193     
194       /* Add symbols for the known sections to the symbol table.  */
195       s = bfd_get_section_by_name (stdoutput, TEXT_SECTION_NAME);
196       symbol_table_insert (section_symbol (s));
>>>     CID 274726:  Dereference null return value  (NULL_RETURNS)
>>>     Assigning: "s" = null return value from "bfd_get_section_by_name(bfd *, 
>>> char const *)".
197       s = bfd_get_section_by_name (stdoutput, DATA_SECTION_NAME);
198       symbol_table_insert (section_symbol (s));
199       s = bfd_get_section_by_name (stdoutput, BSS_SECTION_NAME);
200       symbol_table_insert (section_symbol (s));
201       elf_com_section_ptr = bfd_com_section_ptr;
202     }
/external/gpl3/binutils/dist/gas/config/obj-elf.c: 199 in elf_begin()
193     
194       /* Add symbols for the known sections to the symbol table.  */
195       s = bfd_get_section_by_name (stdoutput, TEXT_SECTION_NAME);
196       symbol_table_insert (section_symbol (s));
197       s = bfd_get_section_by_name (stdoutput, DATA_SECTION_NAME);
198       symbol_table_insert (section_symbol (s));
>>>     CID 274726:  Dereference null return value  (NULL_RETURNS)
>>>     Assigning: "s" = null return value from "bfd_get_section_by_name(bfd *, 
>>> char const *)".
199       s = bfd_get_section_by_name (stdoutput, BSS_SECTION_NAME);
200       symbol_table_insert (section_symbol (s));
201       elf_com_section_ptr = bfd_com_section_ptr;
202     }
203     
204     void

________________________________________________________________________________________________________
*** CID 603825:  Improper use of negative value  (NEGATIVE_RETURNS)
/external/gpl3/gdb/dist/gdb/cli/cli-dump.c: 551 in restore_binary_file()
545       buf = xmalloc (len);
546       make_cleanup (xfree, buf);
547       if (fread (buf, 1, len, file) != len)
548         perror_with_name (filename);
549     
550       /* Now write the buffer into target memory.  */
>>>     CID 603825:  Improper use of negative value  (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "len" = "target_write_memory(CORE_ADDR, 
>>> gdb_byte const *, ssize_t)".
551       len = target_write_memory (data->load_start + data->load_offset, buf, 
len);
552       if (len != 0)
553         warning (_("restore: memory write failed (%s)."), safe_strerror 
(len));
554       do_cleanups (cleanup);
555     }
556     

________________________________________________________________________________________________________
*** CID 603826:  Improper use of negative value  (NEGATIVE_RETURNS)
/external/gpl3/gdb/dist/gdb/cli/cli-dump.c: 497 in restore_section_callback()
491                                    (unsigned long) sec_start + sec_offset
492                                     + data->load_offset + sec_load_count));
493       else
494         puts_filtered ("\n");
495     
496       /* Write the data.  */
>>>     CID 603826:  Improper use of negative value  (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "ret" = "target_write_memory(CORE_ADDR, 
>>> gdb_byte const *, ssize_t)".
497       ret = target_write_memory (sec_start + sec_offset + 
data->load_offset, 
498                                  buf + sec_offset, sec_load_count);
499       if (ret != 0)
500         warning (_("restore: memory write failed (%s)."), safe_strerror 
(ret));
501       do_cleanups (old_chain);
502       return;

________________________________________________________________________________________________________
*** CID 604220:  Dereference null return value  (NULL_RETURNS)
/external/gpl3/gdb/dist/gdb/gnu-v2-abi.c: 255 in gnuv2_value_rtti_type()
249           || (linkage_name=SYMBOL_LINKAGE_NAME (minsym.minsym))==NULL
250           || !is_vtable_name (linkage_name))
251         return NULL;
252     
253       /* If we just skip the prefix, we get screwed by namespaces.  */
254       demangled_name=cplus_demangle(linkage_name,DMGL_PARAMS|DMGL_ANSI);
>>>     CID 604220:  Dereference null return value  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be null "demangled_name" when 
>>> calling "strchr(char const *, int)".
255       p = strchr (demangled_name, ' ');
256       if (p)
257         *p = '\0';
258     
259       /* Lookup the type for the name.  */
260       /* FIXME: chastain/2003-11-26: block=NULL is bogus.  See pr gdb/1465. 
 */
/external/gpl3/gdb/dist/gdb/gnu-v2-abi.c: 255 in gnuv2_value_rtti_type()
249           || (linkage_name=SYMBOL_LINKAGE_NAME (minsym.minsym))==NULL
250           || !is_vtable_name (linkage_name))
251         return NULL;
252     
253       /* If we just skip the prefix, we get screwed by namespaces.  */
254       demangled_name=cplus_demangle(linkage_name,DMGL_PARAMS|DMGL_ANSI);
>>>     CID 604220:  Dereference null return value  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be null "demangled_name" when 
>>> calling "strchr(char const *, int)".
255       p = strchr (demangled_name, ' ');
256       if (p)
257         *p = '\0';
258     
259       /* Lookup the type for the name.  */
260       /* FIXME: chastain/2003-11-26: block=NULL is bogus.  See pr gdb/1465. 
 */

________________________________________________________________________________________________________
*** CID 610391:  Unused pointer value  (UNUSED_VALUE)
/external/gpl3/gdb/dist/gdb/symfile.c: 3864 in _initialize_symfile()
3858     The optional arguments are section-name section-address pairs and\n\
3859     should be specified if the data and bss segments are not contiguous\n\
3860     with the text.  SECT is a section name to be loaded at SECT_ADDR."),
3861                   &cmdlist);
3862       set_cmd_completer (c, filename_completer);
3863     
>>>     CID 610391:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "c" returned by "add_cmd("remove-symbol-file", class_files, 
>>> remove_symbol_file_command(char *, int), gettext("Remove a symbol file 
>>> added via the add-symbol-file command.\nUsage: remove-symbol-file 
>>> FILENAME\n       remove-symbol-file -a ADDRESS\nThe file to remove can be 
>>> identified by its filename or by an address\nthat lies within the 
>>> boundaries of this symbol file in memory."), &cmdlist)" is never used.
3864       c = add_cmd ("remove-symbol-file", class_files,
3865                   remove_symbol_file_command, _("\
3866     Remove a symbol file added via the add-symbol-file command.\n\
3867     Usage: remove-symbol-file FILENAME\n\
3868            remove-symbol-file -a ADDRESS\n\
3869     The file to remove can be identified by its filename or by an 
address\n\

________________________________________________________________________________________________________
*** CID 1001650:  Logically dead code  (DEADCODE)
/external/bsd/bind/dist/lib/irs/getnameinfo.c: 333 in getnameinfo()
327                     case DNS_R_COVERINGNSEC:
328                     case DNS_R_NOTAUTHORITATIVE:
329                     case DNS_R_NOVALIDKEY:
330                     case DNS_R_NOVALIDDS:
331                     case DNS_R_NOVALIDSIG:
332                             ERR(EAI_INSECUREDATA);
>>>     CID 1001650:  Logically dead code  (DEADCODE)
>>>     Execution cannot reach this statement "break;".
333                             break;
334                     default:
335                             ERR(EAI_FAIL);
336                     }
337     
338                     /* Parse the answer for the hostname */

________________________________________________________________________________________________________
*** CID 1009289:  Unchecked return value  (CHECKED_RETURN)
/usr.sbin/rpcbind/rpcbind.c: 121 in main()
115             void *nc_handle;        /* Net config handle */
116             struct rlimit rl;
117             int maxrec = RPC_MAXDATASIZE;
118     
119             parseargs(argc, argv);
120     
>>>     CID 1009289:  Unchecked return value  (CHECKED_RETURN)
>>>     No check of the return value of "getrlimit(8, &rl)".
121             getrlimit(RLIMIT_NOFILE, &rl);
122             if (rl.rlim_cur < 128) {
123                     if (rl.rlim_max <= 128)
124                             rl.rlim_cur = rl.rlim_max;
125                     else
126                             rl.rlim_cur = 128;

________________________________________________________________________________________________________
*** CID 1140456:  Explicit null dereferenced  (FORWARD_NULL)
/external/gpl3/gdb/dist/libiberty/cp-demangle.c: 3247 in d_expression_1()
3241            case 3:
3242              {
3243                struct demangle_component *first;
3244                struct demangle_component *second;
3245                struct demangle_component *third;
3246     
>>>     CID 1140456:  Explicit null dereferenced  (FORWARD_NULL)
>>>     Passing null pointer "code" to function "strcmp(char const *, char 
>>> const *)", which dereferences it.
3247                if (!strcmp (code, "qu"))
3248                  {
3249                    /* ?: expression.  */
3250                    first = d_expression_1 (di);
3251                    second = d_expression_1 (di);
3252                    third = d_expression_1 (di);
/external/gpl3/gdb/dist/libiberty/cp-demangle.c: 3224 in d_expression_1()
3218                struct demangle_component *right;
3219     
3220                if (op_is_new_cast (op))
3221                  left = cplus_demangle_type (di);
3222                else
3223                  left = d_expression_1 (di);
>>>     CID 1140456:  Explicit null dereferenced  (FORWARD_NULL)
>>>     Passing null pointer "code" to function "strcmp(char const *, char 
>>> const *)", which dereferences it.
3224                if (!strcmp (code, "cl"))
3225                  right = d_exprlist (di, 'E');
3226                else if (!strcmp (code, "dt") || !strcmp (code, "pt"))
3227                  {
3228                    right = d_unqualified_name (di);
3229                    if (d_peek_char (di) == 'I')

________________________________________________________________________________________________________
*** CID 1224963:  Explicit null dereferenced  (FORWARD_NULL)
/sys/net/bpf.c: 1394 in bpf_deliver()
1388         void *pkt, u_int pktlen, u_int buflen, const bool rcv)
1389     {
1390            struct timespec ts;
1391            bpf_args_t args;
1392            struct bpf_d *d;
1393     
>>>     CID 1224963:  Explicit null dereferenced  (FORWARD_NULL)
>>>     Assigning: "bc" = "NULL".
1394            const bpf_ctx_t *bc = NULL;
1395            bool gottime = false;
1396     
1397            args.pkt = (const uint8_t *)pkt;
1398            args.wirelen = pktlen;
1399            args.buflen = buflen;

________________________________________________________________________________________________________
*** CID 1224964:  Overflowed array index read  (INTEGER_OVERFLOW)
/sys/ufs/ufs/ufs_quota2.c: 778 in quota2_handle_cmd_del()
772                     goto out_dqlock;
773     
774             hash_mask = ((1 << q2h->q2h_hash_shift) - 1);
775             c.dq = dq;
776             c.id = id;
777             c.q2h = q2h;
>>>     CID 1224964:  Overflowed array index read  (INTEGER_OVERFLOW)
>>>     Overflowed or truncated value (or a value computed from an overflowed 
>>> or truncated value) "id & hash_mask" used as array index.
778             error = quota2_walk_list(ump, hbp, idtype,
779                 &q2h->q2h_entries[id & hash_mask], B_MODIFY, &c,
780                 dq2clear_callback);
781     
782             bwrite(hbp);
783     

________________________________________________________________________________________________________
*** CID 1224966:  Uninitialized pointer read  (UNINIT)
/sys/net/bpf.c: 1391 in bpf_deliver()
1385      */
1386     static inline void
1387     bpf_deliver(struct bpf_if *bp, void *(*cpfn)(void *, const void *, 
size_t),
1388         void *pkt, u_int pktlen, u_int buflen, const bool rcv)
1389     {
1390            struct timespec ts;
>>>     CID 1224966:  Uninitialized pointer read  (UNINIT)
>>>     Declaring variable "args" without initializer.
1391            bpf_args_t args;
1392            struct bpf_d *d;
1393     
1394            const bpf_ctx_t *bc = NULL;
1395            bool gottime = false;
1396     

________________________________________________________________________________________________________
*** CID 1225009:  Out-of-bounds access  (ARRAY_VS_SINGLETON)
/tests/lib/libbpfjit/t_bpfjit.c: 70 in atfu_libbpfjit_empty_body()
64     }
65     
66     ATF_TC_BODY(libbpfjit_empty, tc)
67     {
68      struct bpf_insn dummy;
69     
>>>     CID 1225009:  Out-of-bounds access  (ARRAY_VS_SINGLETON)
>>>     Taking address with "&dummy" yields a singleton pointer.
70      ATF_CHECK(bpfjit_generate_code(NULL, &dummy, 0) == NULL);
71     }
72     
73     ATF_TC(libbpfjit_alu_add_k);
74     ATF_TC_HEAD(libbpfjit_alu_add_k, tc)
75     {

________________________________________________________________________________________________________
*** CID 1225010:  Unchecked return value from library  (CHECKED_RETURN)
/external/gpl3/gdb/dist/gdb/common/filestuff.c: 258 in mark_cloexec()
252     {
253     #ifdef HAVE_F_GETFD
254       int old = fcntl (fd, F_GETFD, 0);
255     
256       if (old != -1)
257         {
>>>     CID 1225010:  Unchecked return value from library  (CHECKED_RETURN)
>>>     No check of the return value of "fcntl(fd, 2, old | 1)".
258           fcntl (fd, F_SETFD, old | FD_CLOEXEC);
259     
260           if (trust_o_cloexec == 0)
261             {
262               if ((old & FD_CLOEXEC) != 0)
263                 trust_o_cloexec = 1;

________________________________________________________________________________________________________
*** CID 1225011:  Unchecked return value  (CHECKED_RETURN)
/external/gpl3/gdb/dist/gdb/gcore.c: 97 in write_gcore_file()
91                                               | SEC_ALLOC);
92       if (note_sec == NULL)
93         error (_("Failed to create 'note' section for corefile: %s"),
94         bfd_errmsg (bfd_get_error ()));
95     
96       bfd_set_section_vma (obfd, note_sec, 0);
>>>     CID 1225011:  Unchecked return value  (CHECKED_RETURN)
>>>     No check of the return value of "bfd_set_section_alignment(obfd, 
>>> note_sec, 0U)".
97       bfd_set_section_alignment (obfd, note_sec, 0);
98       bfd_set_section_size (obfd, note_sec, note_size);
99     
100       /* Now create the memory/load sections.  */
101       if (gcore_memory_sections (obfd) == 0)
102         error (_("gcore: failed to get corefile memory sections from 
target."));

________________________________________________________________________________________________________
*** CID 1225012:  Unchecked return value from library  (CHECKED_RETURN)
/external/ibm-public/postfix/dist/src/posttls-finger/posttls-finger.c: 849 in 
connect_sock()
843          */
844         if (sa->sa_family == AF_INET
845     #ifdef AF_INET6
846             || sa->sa_family == AF_INET6
847     #endif
848             )
>>>     CID 1225012:  Unchecked return value from library  (CHECKED_RETURN)
>>>     No check of the return value of "vstream_tweak_tcp(stream)".
849             vstream_tweak_tcp(stream);
850     
851         return (stream);
852     }
853     
854     /* connect_unix - connect to a unix-domain socket */

________________________________________________________________________________________________________
*** CID 1225013:  Unchecked return value  (CHECKED_RETURN)
/external/ibm-public/postfix/dist/src/tls/tls_session.c: 105 in 
tls_session_stop()
99          * so we will not perform SSL_shutdown() and the session will be 
removed
100          * as being bad.
101          */
102         if (!failure) {
103             retval = tls_bio_shutdown(vstream_fileno(stream), timeout, 
TLScontext);
104             if (retval == 0)
>>>     CID 1225013:  Unchecked return value  (CHECKED_RETURN)
>>>     No check of the return value of "tls_bio(stream->fd, timeout, 
>>> TLScontext, SSL_shutdown(SSL *), NULL, NULL, NULL, 0)".
105                 tls_bio_shutdown(vstream_fileno(stream), timeout, 
TLScontext);
106         }
107         tls_free_context(TLScontext);
108         tls_stream_stop(stream);
109     }
110     

________________________________________________________________________________________________________
*** CID 1225014:  Unchecked return value  (CHECKED_RETURN)
/lib/libutil/sockaddr_snprintf.c: 215 in sockaddr_snprintf()
209                     case 'A':
210                             if (name)
211                                     ADDS(name);
212                             else if (!a)
213                                     ADDNA();
214                             else {
>>>     CID 1225014:  Unchecked return value  (CHECKED_RETURN)
>>>     No check of the return value of "getnameinfo(sa, 
>>> (__socklen_t)sa->sa_len, name = Abuf, 1024U, NULL, 0U, 0)".
215                                     getnameinfo(sa, (socklen_t)sa->sa_len,
216                                             name = Abuf,
217                                             (unsigned int)sizeof(nbuf), 
NULL, 0, 0);
218                                     ADDS(name);
219                             }
220                             break;
/lib/libutil/sockaddr_snprintf.c: 227 in sockaddr_snprintf()
221                     case 'P':
222                             if (port)
223                                     ADDS(port);
224                             else if (p == -1)
225                                     ADDNA();
226                             else {
>>>     CID 1225014:  Unchecked return value  (CHECKED_RETURN)
>>>     No check of the return value of "getnameinfo(sa, 
>>> (__socklen_t)sa->sa_len, NULL, 0U, port = pbuf, 32U, 0)".
227                                     getnameinfo(sa, (socklen_t)sa->sa_len, 
NULL, 0,
228                                             port = pbuf,
229                                             (unsigned int)sizeof(pbuf), 0);
230                                     ADDS(port);
231                             }
232                             break;

________________________________________________________________________________________________________
*** CID 1225015:  Same on both sides  (CONSTANT_EXPRESSION_RESULT)
/external/gpl3/gdb/dist/gdb/frame.c: 594 in frame_id_eq()
588         /* The outermost frame marker is equal to itself.  This is the
589            dodgy thing about outer_frame_id, since between execution steps
590            we might step into another function - from which we can't
591            unwind either.  More thought required to get rid of
592            outer_frame_id.  */
593         eq = 1;
>>>     CID 1225015:  Same on both sides  (CONSTANT_EXPRESSION_RESULT)
>>>     The expression "l.stack_status == FID_STACK_INVALID || l.stack_status 
>>> == FID_STACK_INVALID" does not accomplish anything because it evaluates to 
>>> either of its identical operands, "l.stack_status == FID_STACK_INVALID".  
>>> Did you intend the operands to be different?
594       else if (l.stack_status == FID_STACK_INVALID
595                || l.stack_status == FID_STACK_INVALID)
596         /* Like a NaN, if either ID is invalid, the result is false.
597            Note that a frame ID is invalid iff it is the null frame ID.  */
598         eq = 0;
599       else if (l.stack_status != r.stack_status || l.stack_addr != 
r.stack_addr)

________________________________________________________________________________________________________
*** CID 1225016:  Logically dead code  (DEADCODE)
/external/gpl3/gdb/dist/gdb/frame.c: 325 in fprint_frame_id()
319     {
320       fprintf_unfiltered (file, "{");
321     
322       if (id.stack_status == FID_STACK_INVALID)
323         fprintf_unfiltered (file, "!stack");
324       else if (id.stack_status == FID_STACK_UNAVAILABLE)
>>>     CID 1225016:  Logically dead code  (DEADCODE)
>>>     Execution cannot reach this statement "fprintf_unfiltered(file, "s...".
325         fprintf_unfiltered (file, "stack=<unavailable>");
326       else
327         fprintf_unfiltered (file, "stack=%s", hex_string (id.stack_addr));
328       fprintf_unfiltered (file, ",");
329     
330       fprint_field (file, "code", id.code_addr_p, id.code_addr);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
http://scan.coverity.com/projects/1449?tab=overview

To unsubscribe from the email notification for new defects, 
http://scan5.coverity.com/cgi-bin/unsubscribe.py




Home | Main Index | Thread Index | Old Index