Duncan Coutts pushed to branch wip/dcoutts/printf-warnings at Glasgow Haskell Compiler / GHC

Commits:

4 changed files:

Changes:

  • rts/Messages.c
    ... ... @@ -134,8 +134,8 @@ loop:
    134 134
         if (i == &stg_MSG_TRY_WAKEUP_info)
    
    135 135
         {
    
    136 136
             StgTSO *tso = ((MessageWakeup *)m)->tso;
    
    137
    -        debugTraceCap(DEBUG_sched, cap, "message: try wakeup thread %"
    
    138
    -                      FMT_StgThreadID, tso->id);
    
    137
    +        debugTraceCap(DEBUG_sched, cap,
    
    138
    +                      "message: try wakeup thread %" FMT_StgThreadID, tso->id);
    
    139 139
             tryWakeupThread(cap, tso);
    
    140 140
         }
    
    141 141
         else if (i == &stg_MSG_THROWTO_info)
    
    ... ... @@ -150,8 +150,8 @@ loop:
    150 150
                 goto loop;
    
    151 151
             }
    
    152 152
     
    
    153
    -        debugTraceCap(DEBUG_sched, cap, "message: throwTo %ld -> %ld",
    
    154
    -                      (W_)t->source->id, (W_)t->target->id);
    
    153
    +        debugTraceCap(DEBUG_sched, cap, "message: throwTo %" FMT_StgThreadID
    
    154
    +                      " -> %" FMT_StgThreadID, t->source->id, t->target->id);
    
    155 155
     
    
    156 156
             r = throwToMsg(cap, t);
    
    157 157
     
    

  • rts/STM.c
    ... ... @@ -781,7 +781,7 @@ static StgBool validate_and_acquire_ownership (Capability *cap,
    781 781
                 result = false;
    
    782 782
                 BREAK_FOR_EACH;
    
    783 783
               } else {
    
    784
    -            TRACE("%p : need to check version %ld", trec, e -> num_updates);
    
    784
    +            TRACE("%p : need to check version %" FMT_Int, trec, e->num_updates);
    
    785 785
               }
    
    786 786
             });
    
    787 787
           }
    
    ... ... @@ -816,7 +816,8 @@ static StgBool check_read_only(StgTRecHeader *trec STG_UNUSED) {
    816 816
           StgTVar *s;
    
    817 817
           s = e -> tvar;
    
    818 818
           if (entry_is_read_only(e)) {
    
    819
    -        TRACE("%p : check_read_only for TVar %p, saw %ld", trec, s, e -> num_updates);
    
    819
    +        TRACE("%p : check_read_only for TVar %p, saw %" FMT_Int,
    
    820
    +              trec, s, e->num_updates);
    
    820 821
     
    
    821 822
             // We must first load current_value then num_updates; this is inverse of
    
    822 823
             // the order of the stores in stmCommitTransaction.
    
    ... ... @@ -1200,7 +1201,7 @@ of these false-positives causing actual issues.
    1200 1201
     StgBool stmValidateNestOfTransactions(Capability *cap, StgTRecHeader *trec, StgBool optimistically) {
    
    1201 1202
       StgTRecHeader *t;
    
    1202 1203
     
    
    1203
    -  TRACE("%p : stmValidateNestOfTransactions, %b", trec, optimistically);
    
    1204
    +  TRACE("%p : stmValidateNestOfTransactions, %d", trec, optimistically);
    
    1204 1205
       ASSERT(trec != NO_TREC);
    
    1205 1206
       ASSERT((trec -> state == TREC_ACTIVE) ||
    
    1206 1207
              (trec -> state == TREC_WAITING) ||
    

  • rts/posix/Poll.c
    ... ... @@ -432,13 +432,13 @@ void pollCompletedTimeoutsOrIOPoll(CapIOManager *iomgr)
    432 432
     
    
    433 433
             debugTrace(DEBUG_iomanager,
    
    434 434
                        "ppoll(nfds = %lu, timeout.sec = 0, timeout.nsec = 0) = %d",
    
    435
    -                   nfds, res);
    
    435
    +                   (unsigned long) nfds, res);
    
    436 436
     #else
    
    437 437
             int res = poll(poll_table, nfds, 0);
    
    438 438
     
    
    439 439
             debugTrace(DEBUG_iomanager,
    
    440 440
                        "poll(nfds = %lu, timeout_ms = 0) = %d",
    
    441
    -                   nfds, res);
    
    441
    +                   (unsigned long) nfds, res);
    
    442 442
     #endif
    
    443 443
             if (res == 0) {
    
    444 444
                 /* There is no I/O ready. We'll return to the scheduler. */
    
    ... ... @@ -513,8 +513,9 @@ bool awaitCompletedTimeoutsOrIOPoll(CapIOManager *iomgr)
    513 513
     
    
    514 514
             debugTrace(DEBUG_iomanager,
    
    515 515
                        "ppoll(nfds = %lu, timeout.sec = %lu, timeout.nsec = %lu) = %d",
    
    516
    -                   nfds, timeout_ns == NULL ? -1 : timeout_ns->tv_sec,
    
    517
    -                         timeout_ns == NULL ?  0 : timeout_ns->tv_nsec,
    
    516
    +                   (unsigned long) nfds,
    
    517
    +                   timeout_ns == NULL ? -1 : timeout_ns->tv_sec,
    
    518
    +                   timeout_ns == NULL ?  0 : timeout_ns->tv_nsec,
    
    518 519
                        res);
    
    519 520
     #else
    
    520 521
             int res = poll(poll_table, nfds, timeout_ms);
    

  • rts/sm/GC.c
    ... ... @@ -636,13 +636,13 @@ GarbageCollect (struct GcConfig config,
    636 636
                   if(idle_cap[i]) { continue; }
    
    637 637
                   thread = gc_threads[i];
    
    638 638
                   debugTrace(DEBUG_gc,"thread %d:", i);
    
    639
    -              debugTrace(DEBUG_gc,"   copied           %ld",
    
    639
    +              debugTrace(DEBUG_gc,"   copied           %" FMT_Word,
    
    640 640
                              RELAXED_LOAD(&thread->copied) * sizeof(W_));
    
    641
    -              debugTrace(DEBUG_gc,"   scanned          %ld",
    
    641
    +              debugTrace(DEBUG_gc,"   scanned          %" FMT_Word,
    
    642 642
                              RELAXED_LOAD(&thread->scanned) * sizeof(W_));
    
    643
    -              debugTrace(DEBUG_gc,"   any_work         %ld",
    
    643
    +              debugTrace(DEBUG_gc,"   any_work         %" FMT_Word,
    
    644 644
                              RELAXED_LOAD(&thread->any_work));
    
    645
    -              debugTrace(DEBUG_gc,"   scav_find_work %ld",
    
    645
    +              debugTrace(DEBUG_gc,"   scav_find_work   %" FMT_Word ,
    
    646 646
                              RELAXED_LOAD(&thread->scav_find_work));
    
    647 647
     
    
    648 648
                   any_work += RELAXED_LOAD(&thread->any_work);