[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #21494 [Core Tor/Tor]: Fix scan-build warnings about assigning to char**



#21494: Fix scan-build warnings about assigning to char**
------------------------------+------------------------------
     Reporter:  teor          |      Owner:
         Type:  defect        |     Status:  new
     Priority:  Low           |  Milestone:  Tor: unspecified
    Component:  Core Tor/Tor  |    Version:
     Severity:  Minor         |   Keywords:  clang scan-build
Actual Points:                |  Parent ID:
       Points:  0.2           |   Reviewer:
      Sponsor:                |
------------------------------+------------------------------
 scan-build complains about:
 {{{
 const char **argv; /* cli arguments */
 ...
 argv = tor_calloc(args_n, sizeof(char *));
 }}}
 and
 {{{
 process_environment_t *env =
 tor_malloc_zero(sizeof(process_environment_t));
 ...
 env->unixoid_environment_block = tor_calloc(n_env_vars + 1, sizeof(char
 *));
 }}}

 This is fine, and maybe there's a cast or magic comment we could use to
 make the warnings go away.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21494>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs