From 6ff4ac7703883a70034b50ea510edba80b6a78bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Castelli?= Date: Mon, 26 May 2014 11:42:17 +0200 Subject: [PATCH 1/1] Fix a compilation error regarding logging and strings in fat trees --- src/surf/surf_routing_cluster_fat_tree.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/surf/surf_routing_cluster_fat_tree.cpp b/src/surf/surf_routing_cluster_fat_tree.cpp index 0829ce624a..f94b395f77 100644 --- a/src/surf/surf_routing_cluster_fat_tree.cpp +++ b/src/surf/surf_routing_cluster_fat_tree.cpp @@ -64,7 +64,6 @@ void AsClusterFatTree::getRouteAndLatency(RoutingEdgePtr src, destination = tempIter->second; - XBT_DEBUG("%d %d", src->getId(), source->id); XBT_DEBUG("Get route and latency from '%s' [%d] to '%s' [%d] in a fat tree", src->getName(), src->getId(), dst->getName(), dst->getId()); @@ -127,7 +126,7 @@ void AsClusterFatTree::create_links(sg_platf_cluster_cbarg_t cluster){ for (unsigned int i = 1 ; i <= this->levels ; i++) { msgBuffer << ", " << this->nodesByLevel[i] << " switches at level " << i; } - XBT_DEBUG(msgBuffer.str().c_str()); + XBT_DEBUG("%s", msgBuffer.str().c_str()); msgBuffer.str(""); msgBuffer << "Nodes are : "; @@ -135,7 +134,7 @@ void AsClusterFatTree::create_links(sg_platf_cluster_cbarg_t cluster){ msgBuffer << this->nodes[i]->id << "(" << this->nodes[i]->level << "," << this->nodes[i]->position << ") "; } - XBT_DEBUG(msgBuffer.str().c_str()); + XBT_DEBUG("%s", msgBuffer.str().c_str()); } @@ -157,7 +156,7 @@ void AsClusterFatTree::create_links(sg_platf_cluster_cbarg_t cluster){ msgBuffer << "(" << this->links[i]->upNode->id << "," << this->links[i]->downNode->id << ") "; } - XBT_DEBUG(msgBuffer.str().c_str()); + XBT_DEBUG("%s", msgBuffer.str().c_str()); } @@ -210,7 +209,7 @@ bool AsClusterFatTree::areRelated(FatTreeNode *parent, FatTreeNode *child) { } msgBuffer << ">"; msgBuffer << " related ? "; - XBT_DEBUG(msgBuffer.str().c_str()); + XBT_DEBUG("%s", msgBuffer.str().c_str()); } if (parent->level != child->level + 1) { @@ -306,7 +305,7 @@ void AsClusterFatTree::generateLabels() { } msgBuffer << "> to " << k << " (" << i << "," << j <<")"; - XBT_DEBUG(bprintf(msgBuffer.str().c_str())); + XBT_DEBUG("%s", msgBuffer.str().c_str()); } this->nodes[k]->label.assign(currentLabel.begin(), currentLabel.end()); -- 2.20.1