mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-23 05:05:30 -04:00
Removed some more compiler warnings from Windows compile (GCC 4.4).
Added -Wextra to the Windows compile. Added new define in libbitdht for snprintf and fprintf to proper handling of "%ll" under Windows. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4951 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2d2b7230d1
commit
970d88200d
35 changed files with 170 additions and 125 deletions
|
@ -22,6 +22,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h> /* malloc() realloc() free() strtoll() */
|
||||
#include <string.h> /* memset() */
|
||||
#include "util/bdstring.h"
|
||||
|
||||
#include "bitdht/bencode.h"
|
||||
|
||||
|
@ -425,7 +426,7 @@ int be_encode(be_node *node, char *str, int len)
|
|||
|
||||
switch (node->type) {
|
||||
case BE_STR:
|
||||
snprintf(str, len, "%lli:", be_str_len(node));
|
||||
bd_snprintf(str, len, "%lli:", be_str_len(node));
|
||||
loc += strlen(&(str[loc]));
|
||||
|
||||
memcpy(&(str[loc]), node->val.s, be_str_len(node));
|
||||
|
@ -433,7 +434,7 @@ int be_encode(be_node *node, char *str, int len)
|
|||
break;
|
||||
|
||||
case BE_INT:
|
||||
snprintf(str, len, "i%llie", node->val.i);
|
||||
bd_snprintf(str, len, "i%llie", node->val.i);
|
||||
loc += strlen(&(str[loc]));
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue