diff options
author | Matt Johnston <matt@ucc.asn.au> | 2015-06-04 23:08:50 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2015-06-04 23:08:50 +0800 |
commit | d96a52541f0f89836e99fea2d1bb8e3f4a1f4144 (patch) | |
tree | 4eedfa1c5b7e94fb6d930e2528c4d3eb6c27a7c2 /common-algo.c | |
parent | ecd850521816dc2a78792fc53dd9c6c80d5d1b91 (diff) | |
parent | 9fdab3ced8374b991bfadce0056cf5bdf7cfb3d6 (diff) |
Merge pull request #13 from gazoo74/fix-warnings
Fix warnings
Diffstat (limited to 'common-algo.c')
-rw-r--r-- | common-algo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common-algo.c b/common-algo.c index b1d4966..002ae66 100644 --- a/common-algo.c +++ b/common-algo.c @@ -325,10 +325,10 @@ void buf_put_algolist(buffer * buf, algo_type localalgos[]) { buf_putbyte(algolist, ','); donefirst = 1; len = strlen(localalgos[i].name); - buf_putbytes(algolist, localalgos[i].name, len); + buf_putbytes(algolist, (const unsigned char *) localalgos[i].name, len); } } - buf_putstring(buf, algolist->data, algolist->len); + buf_putstring(buf, (const char*)algolist->data, algolist->len); buf_free(algolist); } @@ -341,12 +341,12 @@ algo_type * buf_match_algo(buffer* buf, algo_type localalgos[], enum kexguess2_used *kexguess2, int *goodguess) { - unsigned char * algolist = NULL; - const unsigned char *remotenames[MAX_PROPOSED_ALGO], *localnames[MAX_PROPOSED_ALGO]; + char * algolist = NULL; + const char *remotenames[MAX_PROPOSED_ALGO], *localnames[MAX_PROPOSED_ALGO]; unsigned int len; unsigned int remotecount, localcount, clicount, servcount, i, j; algo_type * ret = NULL; - const unsigned char **clinames, **servnames; + const char **clinames, **servnames; if (goodguess) { *goodguess = 0; @@ -491,7 +491,7 @@ algolist_string(algo_type algos[]) buf_setpos(b, b->len); buf_putbyte(b, '\0'); buf_setpos(b, 4); - ret_list = m_strdup(buf_getptr(b, b->len - b->pos)); + ret_list = m_strdup((const char *) buf_getptr(b, b->len - b->pos)); buf_free(b); return ret_list; } |