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

[tor-bugs] #5969 [- Select a component]: A couple of compile warnings with clang 3.1



#5969: A couple of compile warnings with clang 3.1
----------------------------------+-----------------------------------------
 Reporter:  Sebastian             |          Owner:     
     Type:  defect                |         Status:  new
 Priority:  normal                |      Milestone:     
Component:  - Select a component  |        Version:     
 Keywords:                        |         Parent:     
   Points:                        |   Actualpoints:     
----------------------------------+-----------------------------------------
 First one is
 {{{
 crypto.c:1888:38: error: size argument in 'strlcpy' call appears to be
 size of
       the source; expected the size of the destination
       [-Werror,-Wstrlcpy-strlcat-size]
     strlcpy(fname_new, fname, strlen(fname) + 8);
                               ~~~~~~~^~~~~~~~~~
 }}}
 second one is
 {{{

 compat.c:362:28: error: format string is not a string literal
       [-Werror,-Wformat-nonliteral]
   r = vsnprintf(str, size, format, args);
       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
 /usr/include/secure/_stdio.h:72:63: note: expanded from macro 'vsnprintf'
   __builtin___vsnprintf_chk (str, len, 0, __darwin_obsz(str), format, ap)
                                                               ^
 compat.c:412:32: error: format string is not a string literal
       [-Werror,-Wformat-nonliteral]
   int r = vasprintf(&strp_tmp, fmt, args);
                                ^~~
 }}}

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5969>
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