Cleaned up g++ warnings.

This commit is contained in:
Seth Hall 2011-01-20 15:07:24 -05:00
parent aa0691ba21
commit ef1650f6a2
7 changed files with 21 additions and 21 deletions

View file

@ -82,7 +82,7 @@ UUID::UUID(const char* str)
}
if ( i != 16 )
internal_error(fmt("invalid UUID string: %s", str));
internal_error("invalid UUID string: %s", str);
}
typedef map<UUID, BroEnum::dce_rpc_if_id> uuid_map_t;

View file

@ -99,8 +99,8 @@ void* PrefixTable::Lookup(const Val* value, bool exact) const
break;
default:
internal_error(fmt("Wrong index type %d for PrefixTable",
value->Type()->Tag()));
internal_error("Wrong index type %d for PrefixTable",
value->Type()->Tag());
return 0;
}
}

View file

@ -1505,13 +1505,13 @@ bool RemoteSerializer::DoMessage()
{
// We shut the connection to this peer down,
// so we ignore all further messages.
DEBUG_COMM(fmt("parent: ignoring %s due to shutdown of peer #%d",
DEBUG_COMM(fmt("parent: ignoring %s due to shutdown of peer #%llu",
msgToStr(current_msgtype),
current_peer ? current_peer->id : 0));
return true;
}
DEBUG_COMM(fmt("parent: %s from child; peer is #%d",
DEBUG_COMM(fmt("parent: %s from child; peer is #%llu",
msgToStr(current_msgtype),
current_peer ? current_peer->id : 0));
@ -2610,7 +2610,7 @@ bool RemoteSerializer::SendCMsgToChild(char msg_type, Peer* peer)
bool RemoteSerializer::SendToChild(char type, Peer* peer, char* str, int len)
{
DEBUG_COMM(fmt("parent: (->child) %s (#%d, %s)", msgToStr(type), peer ? peer->id : PEER_NONE, str));
DEBUG_COMM(fmt("parent: (->child) %s (#%d, %s)", msgToStr(type), (uint32_t) (peer ? peer->id : PEER_NONE), str));
if ( ! child_pid )
return false;
@ -2635,7 +2635,7 @@ bool RemoteSerializer::SendToChild(char type, Peer* peer, int nargs, ...)
#ifdef DEBUG
va_start(ap, nargs);
DEBUG_COMM(fmt("parent: (->child) %s (#%d,%s)",
msgToStr(type), peer ? peer->id : PEER_NONE, fmt_uint32s(nargs, ap)));
msgToStr(type), (uint32_t) (peer ? peer->id : PEER_NONE), fmt_uint32s(nargs, ap)));
va_end(ap);
#endif
@ -2715,7 +2715,7 @@ void RemoteSerializer::InternalCommError(const char* msg)
#ifdef DEBUG_COMMUNICATION
DumpDebugData();
#else
internal_error(msg);
internal_error(msg, "");
#endif
}
@ -3065,7 +3065,7 @@ bool SocketComm::ProcessParentMessage()
}
default:
internal_error(fmt("unknown msg type %d", parent_msgtype));
internal_error("unknown msg type %d", parent_msgtype);
return true;
}
@ -3235,7 +3235,7 @@ bool SocketComm::ForwardChunkToPeer()
{
#ifdef DEBUG
if ( parent_peer )
DEBUG_COMM(fmt("child: not connected to #%d", parent_id));
DEBUG_COMM(fmt("child: not connected to #%d", (uint) parent_id));
#endif
}
@ -3319,7 +3319,7 @@ bool SocketComm::ProcessRemoteMessage(SocketComm::Peer* peer)
CMsg* msg = (CMsg*) c->data;
DEBUG_COMM(fmt("child: %s from peer #%d",
msgToStr(msg->Type()), peer->id));
msgToStr(msg->Type()), (uint) peer->id));
switch ( msg->Type() ) {
case MSG_PHASE_DONE:
@ -3795,7 +3795,7 @@ bool SocketComm::SendToParent(char type, Peer* peer, const char* str, int len)
#ifdef DEBUG
// str may already by constructed with fmt()
const char* tmp = copy_string(str);
DEBUG_COMM(fmt("child: (->parent) %s (#%d, %s)", msgToStr(type), peer ? peer->id : RemoteSerializer::PEER_NONE, tmp));
DEBUG_COMM(fmt("child: (->parent) %s (#%d, %s)", msgToStr(type), (uint) (peer ? peer->id : RemoteSerializer::PEER_NONE), tmp));
delete [] tmp;
#endif
if ( sendToIO(io, type, peer ? peer->id : RemoteSerializer::PEER_NONE,
@ -3814,7 +3814,7 @@ bool SocketComm::SendToParent(char type, Peer* peer, int nargs, ...)
#ifdef DEBUG
va_start(ap,nargs);
DEBUG_COMM(fmt("child: (->parent) %s (#%d,%s)", msgToStr(type), peer ? peer->id : RemoteSerializer::PEER_NONE, fmt_uint32s(nargs, ap)));
DEBUG_COMM(fmt("child: (->parent) %s (#%d,%s)", msgToStr(type), (uint) (peer ? peer->id : RemoteSerializer::PEER_NONE), fmt_uint32s(nargs, ap)));
va_end(ap);
#endif
@ -3850,7 +3850,7 @@ bool SocketComm::SendToPeer(Peer* peer, char type, const char* str, int len)
#ifdef DEBUG
// str may already by constructed with fmt()
const char* tmp = copy_string(str);
DEBUG_COMM(fmt("child: (->peer) %s to #%d (%s)", msgToStr(type), peer->id, tmp));
DEBUG_COMM(fmt("child: (->peer) %s to #%d (%s)", msgToStr(type), (uint) peer->id, tmp));
delete [] tmp;
#endif
@ -3870,7 +3870,7 @@ bool SocketComm::SendToPeer(Peer* peer, char type, int nargs, ...)
#ifdef DEBUG
va_start(ap,nargs);
DEBUG_COMM(fmt("child: (->peer) %s to #%d (%s)",
msgToStr(type), peer->id, fmt_uint32s(nargs, ap)));
msgToStr(type), (uint) peer->id, fmt_uint32s(nargs, ap)));
va_end(ap);
#endif
@ -3890,7 +3890,7 @@ bool SocketComm::SendToPeer(Peer* peer, char type, int nargs, ...)
bool SocketComm::SendToPeer(Peer* peer, ChunkedIO::Chunk* c)
{
DEBUG_COMM(fmt("child: (->peer) chunk of size %d to #%d", c->len, peer->id));
DEBUG_COMM(fmt("child: (->peer) chunk of size %d to #%d", c->len, (uint) peer->id));
if ( ! sendToIO(peer->io, c) )
{
Error(fmt("child: write error %s", io->Error()), peer);

View file

@ -166,7 +166,7 @@ void SMB_Session::Deliver(int is_orig, int len, const u_char* data)
const u_char* tmp = data_start + next;
if ( data_start + next < data + body.length() )
{
Weird(fmt("ANDX buffer overlapping: next = %d, buffer_end = %d", next, data + body.length() - data_start));
Weird(fmt("ANDX buffer overlapping: next = %d, buffer_end = %ld", next, data + body.length() - data_start));
break;
}

View file

@ -570,7 +570,7 @@ cq_debugbucket(register struct cq_handle *hp,
bp2 = hp->buckets + PRI2BUCKET(hp, bp->pri);
if (bp2 != buckets) {
fprintf(stderr,
"%f in wrong bucket! (off by %d)\n",
"%f in wrong bucket! (off by %ld)\n",
bp->pri, bp2 - buckets);
cq_dump(hp);
abort();

View file

@ -8,5 +8,5 @@ analyzer DCE_RPC withcontext {
flow: DCE_RPC_Flow;
};
%include "dce_rpc-protocol.pac"
%include "dce_rpc-analyzer.pac"
%include dce_rpc-protocol.pac
%include dce_rpc-analyzer.pac

View file

@ -1027,7 +1027,7 @@ lookup_then_remove (patricia_tree_t *tree, char *string)
{
patricia_node_t *node;
if (node = try_search_exact (tree, string))
if ( (node = try_search_exact(tree, string)) )
patricia_remove (tree, node);
}