Merge #55: Fix Warnings
2cfc903cb9
Fix -Wvarargs warnings (Lucas Betschart)ff5564e4ce
Fix -Wreturn-type warnings (Lucas Betschart)1065303ecb
Fix -Wuninitialized warnings (Lucas Betschart) Pull request description: Fixes what my clang said he doesn't like. ACKs for top commit: Sjors: Pure zen, thanks! ACK2cfc903
(still works when rebased on master) sipa: utACK2cfc903cb9
Tree-SHA512: 600fe532cb58c95968afabec38745c2a7c4a60603685c154538eae253ebfd492bce4110a99bcd37ec198150d85e2a1d41f1a491b2cf1d832a84363e913d7c550
This commit is contained in:
commit
0df0e521f1
2 changed files with 3 additions and 2 deletions
3
db.h
3
db.h
|
@ -282,7 +282,7 @@ public:
|
||||||
} else {
|
} else {
|
||||||
CAddrDb *db = const_cast<CAddrDb*>(this);
|
CAddrDb *db = const_cast<CAddrDb*>(this);
|
||||||
db->nId = 0;
|
db->nId = 0;
|
||||||
int n;
|
int n = 0;
|
||||||
READWRITE(n);
|
READWRITE(n);
|
||||||
for (int i=0; i<n; i++) {
|
for (int i=0; i<n; i++) {
|
||||||
CAddrInfo info;
|
CAddrInfo info;
|
||||||
|
@ -329,6 +329,7 @@ public:
|
||||||
bool Get(CServiceResult &ip, int& wait) {
|
bool Get(CServiceResult &ip, int& wait) {
|
||||||
CRITICAL_BLOCK(cs)
|
CRITICAL_BLOCK(cs)
|
||||||
return Get_(ip, wait);
|
return Get_(ip, wait);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
void GetMany(std::vector<CServiceResult> &ips, int max, int& wait) {
|
void GetMany(std::vector<CServiceResult> &ips, int max, int& wait) {
|
||||||
CRITICAL_BLOCK(cs) {
|
CRITICAL_BLOCK(cs) {
|
||||||
|
|
2
util.h
2
util.h
|
@ -82,7 +82,7 @@ void static inline Sleep(int nMilliSec) {
|
||||||
|
|
||||||
std::string vstrprintf(const std::string &format, va_list ap);
|
std::string vstrprintf(const std::string &format, va_list ap);
|
||||||
|
|
||||||
std::string static inline strprintf(const std::string &format, ...) {
|
std::string static inline strprintf(const std::string format, ...) {
|
||||||
va_list arg_ptr;
|
va_list arg_ptr;
|
||||||
va_start(arg_ptr, format);
|
va_start(arg_ptr, format);
|
||||||
std::string ret = vstrprintf(format, arg_ptr);
|
std::string ret = vstrprintf(format, arg_ptr);
|
||||||
|
|
Loading…
Reference in a new issue