Skip to content

Loading…

fix 2 compiler warnings #1171

Merged
merged 2 commits into from

3 participants

@Diapolo

No description provided.

@jgarzik
Bitcoin member

Please add the specific warning being fixed to the commit messages. "fix compiler warning" is vague, and will get even more vague over time. Code changes look OK

@sipa
Bitcoin member

ACK

@jgarzik
Bitcoin member

Sorry, to be more specific, please redo the commits to include the warning being fixed inside the git commit itself. Need to get that useful info into the permanent git history.

Philip Kaufmann added some commits
Philip Kaufmann fix compiler warning "suggest explicit braces to avoid ambiguous "else"
[-Wparentheses]" in net.cpp
f8e4d43
Philip Kaufmann fix compiler warning "suggest parentheses around assignment used as t…
…ruth

value [-Wparentheses]" in util.cpp
1c94f88
@Diapolo

Renamed the commit-messages to be more detailed.

@jgarzik
Bitcoin member

ACK

@jgarzik jgarzik merged commit ca97bde into bitcoin:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 1, 2012
  1. fix compiler warning "suggest explicit braces to avoid ambiguous "else"

    Philip Kaufmann committed
    [-Wparentheses]" in net.cpp
  2. fix compiler warning "suggest parentheses around assignment used as t…

    Philip Kaufmann committed
    …ruth
    
    value [-Wparentheses]" in util.cpp
Showing with 5 additions and 1 deletion.
  1. +4 −0 src/net.cpp
  2. +1 −1 src/util.cpp
View
4 src/net.cpp
@@ -1585,12 +1585,16 @@ void StartNode(void* parg)
{
vector<CNetAddr> vaddr;
if (LookupHost(pszHostName, vaddr))
+ {
BOOST_FOREACH (const CNetAddr &addr, vaddr)
+ {
if (!addr.IsLocal())
{
addrLocalHost.SetIP(addr);
break;
}
+ }
+ }
}
#else
// Get local host ip
View
2 src/util.cpp
@@ -252,7 +252,7 @@ inline int OutputDebugStringF(const char* pszFormat, ...)
*pend = '\0';
char* p1 = pszBuffer;
char* p2;
- while (p2 = strchr(p1, '\n'))
+ while ((p2 = strchr(p1, '\n')))
{
p2++;
char c = *p2;
Something went wrong with that request. Please try again.