Merge pull request #19 from alagoutte/gcc_new

fix warning/error when build with GCC

FossilOrigin-Name: 8d9fe026c6a19613227b1dd81b2b0e12600fe7450f8135e6fcea22c5faa1949b
This commit is contained in:
7u83@mail.ru 2016-03-25 17:09:06 +00:00
commit 8f84accdea
3 changed files with 1 additions and 6 deletions

View File

@ -626,7 +626,7 @@ extern struct cw_strlist_elem mbag_item_strings[];
#define cw_strerror(rc) cw_strrc(rc)
*/
static inline const char * cw_strerror(rc) {
static inline const char * cw_strerror(int rc) {
if (rc<0){
if (errno==EAGAIN)
return "Timed out";

View File

@ -72,9 +72,6 @@ static void dtls_debug_cb(int write_p,int version,int type, const void * buf,siz
static void dtls_info_cb (const SSL *ssl, int where, int ret)
{
const char *str = NULL;
int w;
w = where & ~SSL_ST_MASK;
str = where & SSL_ST_CONNECT ? "connect" : where & SSL_ST_ACCEPT ? "accept" : "undefined";
if (where & SSL_CB_LOOP)

View File

@ -33,11 +33,9 @@
int format_is_utf8(unsigned char *str, size_t len)
{
size_t i = 0;
size_t j = 0;
size_t bytes = 0;
while (i < len) {
j = i;
if (str[i] < 0x20) {
return 0;
}