From: Benjamin Poirier Date: Fri, 18 Dec 2009 15:41:26 +0000 (-0500) Subject: Fix compilation warnings X-Git-Tag: v0.12.26~12 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=053b4b77c527fa96a7a24967da9b2d0f6ef68cfc;p=lttv.git Fix compilation warnings Signed-off-by: Benjamin Poirier --- diff --git a/lttv/lttv/sync/event_analysis_chull.c b/lttv/lttv/sync/event_analysis_chull.c index 0e583791..8e965b72 100644 --- a/lttv/lttv/sync/event_analysis_chull.c +++ b/lttv/lttv/sync/event_analysis_chull.c @@ -22,6 +22,7 @@ #endif #include +#include #include #include #include @@ -270,7 +271,7 @@ static void gfDumpHullToFile(gpointer data, gpointer userData) Point* point; point= (Point*) data; - fprintf((FILE*) userData, "%20llu %20llu\n", point->x, point->y); + fprintf((FILE*) userData, "%20" PRIu64 " %20" PRIu64 "\n", point->x, point->y); } @@ -401,7 +402,8 @@ static void analyzeMessageCHull(SyncState* const syncState, Message* const messa newPoint->x= message->inE->cpuTime; newPoint->y= message->outE->cpuTime; hullType= UPPER; - g_debug("Reception point hullArray[%lu][%lu] x= inE->time= %llu y= outE->time= %llu", + g_debug("Reception point hullArray[%lu][%lu] " + "x= inE->time= %" PRIu64 " y= outE->time= %" PRIu64, message->inE->traceNum, message->outE->traceNum, newPoint->x, newPoint->y); } @@ -411,7 +413,8 @@ static void analyzeMessageCHull(SyncState* const syncState, Message* const messa newPoint->x= message->outE->cpuTime; newPoint->y= message->inE->cpuTime; hullType= LOWER; - g_debug("Send point hullArray[%lu][%lu] x= inE->time= %llu y= outE->time= %llu", + g_debug("Send point hullArray[%lu][%lu] " + "x= inE->time= %" PRIu64 " y= outE->time= %" PRIu64, message->inE->traceNum, message->outE->traceNum, newPoint->x, newPoint->y); } @@ -703,7 +706,9 @@ static int jointCmp(const Point const* p1, const Point const* p2, const const double fuzzFactor= 0.; result= crossProductK(p1, p2, p1, p3); - g_debug("crossProductK(p1= (%llu, %llu), p2= (%llu, %llu), p1= (%llu, %llu), p3= (%llu, %llu))= %g", + g_debug("crossProductK(p1= (%" PRIu64 ", %" PRIu64 "), " + "p2= (%" PRIu64 ", %" PRIu64 "), p1= (%" PRIu64 ", %" PRIu64 "), " + "p3= (%" PRIu64 ", %" PRIu64 "))= %g", p1->x, p1->y, p2->x, p2->y, p1->x, p1->y, p3->x, p3->y, result); if (result < fuzzFactor) { @@ -1075,14 +1080,15 @@ static Factors* calculateFactorsExact(GQueue* const cu, GQueue* const cl, const p1= g_queue_peek_nth(c1, i1); p2= g_queue_peek_nth(c2, i2); - g_debug("Resulting points are: c1[i1]: x= %llu y= %llu c2[i2]: x= %llu y= %llu", - p1->x, p1->y, p2->x, p2->y); + g_debug("Resulting points are: c1[i1]: x= %" PRIu64 " y= %" PRIu64 + " c2[i2]: x= %" PRIu64 " y= %" PRIu64 "", p1->x, p1->y, p2->x, p2->y); result= malloc(sizeof(Factors)); result->drift= slope(p1, p2); result->offset= intercept(p1, p2); - g_debug("Resulting factors are: drift= %g offset= %g", result->drift, result->offset); + g_debug("Resulting factors are: drift= %g offset= %g", result->drift, + result->offset); return result; } diff --git a/lttv/lttv/sync/event_matching_broadcast.c b/lttv/lttv/sync/event_matching_broadcast.c index 1f3ec560..96885697 100644 --- a/lttv/lttv/sync/event_matching_broadcast.c +++ b/lttv/lttv/sync/event_matching_broadcast.c @@ -21,6 +21,7 @@ #endif #include +#include #include #include #include @@ -425,7 +426,7 @@ static void writeAccuracyPoints(MatchingGraphsBroadcast* graphs, const if (eventI->traceNum < eventJ->traceNum) { fprintf(graphs->accuracyPoints[eventJ->traceNum][eventI->traceNum], - "%20llu %20.9f\n", eventI->cpuTime, + "%20" PRIu64 " %20.9f\n", eventI->cpuTime, wallTimeSub(&eventJ->wallTime, &eventI->wallTime)); graphs->pointsNb[eventJ->traceNum][eventI->traceNum]++; } diff --git a/lttv/lttv/sync/event_matching_tcp.c b/lttv/lttv/sync/event_matching_tcp.c index 8d4d8e32..9ba8b632 100644 --- a/lttv/lttv/sync/event_matching_tcp.c +++ b/lttv/lttv/sync/event_matching_tcp.c @@ -21,6 +21,7 @@ #endif #include +#include #include #include #include @@ -645,7 +646,7 @@ static void writeMessagePoint(FILE* stream, const Message* const message) y= message->inE->cpuTime; } - fprintf(stream, "%20llu %20llu\n", x, y); + fprintf(stream, "%20" PRIu64 " %20" PRIu64 "\n", x, y); } diff --git a/lttv/lttv/sync/event_processing_lttng_standard.c b/lttv/lttv/sync/event_processing_lttng_standard.c index 76a754b8..c3b4da23 100644 --- a/lttv/lttv/sync/event_processing_lttng_standard.c +++ b/lttv/lttv/sync/event_processing_lttng_standard.c @@ -113,7 +113,8 @@ static void initProcessingLTTVStandard(SyncState* const syncState, ...) for(i= 0; i < syncState->traceNb; i++) { g_hash_table_insert(processingData->traceNumTable, - processingData->traceSetContext->traces[i]->t, (gpointer) i); + processingData->traceSetContext->traces[i]->t, + GUINT_TO_POINTER(i)); } processingData->pendingRecv= malloc(sizeof(GHashTable*) * @@ -384,6 +385,7 @@ static gboolean processEventLTTVStandard(void* hookData, void* callData) struct marker_info* info; SyncState* syncState; ProcessingDataLTTVStandard* processingData; + gpointer traceNumP; traceHook= (LttvTraceHook*) hookData; tfc= (LttvTracefileContext*) callData; @@ -398,7 +400,8 @@ static gboolean processEventLTTVStandard(void* hookData, void* callData) wTime.nanosec= time.tv_nsec; g_assert(g_hash_table_lookup_extended(processingData->traceNumTable, - trace, NULL, (gpointer*) &traceNum)); + trace, NULL, &traceNumP)); + traceNum= GPOINTER_TO_INT(traceNumP); g_debug("Process event: time: %ld.%09ld trace: %ld (%p) name: %s ", time.tv_sec, time.tv_nsec, traceNum, trace, diff --git a/lttv/modules/text/sync_chain_batch.c b/lttv/modules/text/sync_chain_batch.c index 55abb676..23d3e05f 100644 --- a/lttv/modules/text/sync_chain_batch.c +++ b/lttv/modules/text/sync_chain_batch.c @@ -284,7 +284,6 @@ void setupSyncChain(LttvTracesetContext* const traceSetContext) struct TracesetChainState* tracesetChainState; SyncState* syncState; GList* result; - int retval; tracesetChainState= g_hash_table_lookup(tracesetChainStates, traceSetContext); syncState= malloc(sizeof(SyncState)); @@ -339,7 +338,7 @@ void teardownSyncChain(LttvTracesetContext* const traceSetContext) SyncState* syncState; struct timeval endTime; struct rusage endUsage; - unsigned int i, j; + unsigned int i; int retval; tracesetChainState= g_hash_table_lookup(tracesetChainStates, traceSetContext);