]> granicus.if.org Git - transmission/commitdiff
Fix format specifier warning introduced couple commits earlier
authorMike Gelfand <mikedld@mikedld.com>
Sat, 13 Dec 2014 17:04:14 +0000 (17:04 +0000)
committerMike Gelfand <mikedld@mikedld.com>
Sat, 13 Dec 2014 17:04:14 +0000 (17:04 +0000)
libtransmission/peer-mgr.c
libtransmission/transmission.h

index 32d2f2dbfc31f929f2da9663df6d0b6cbfde0382..bf96d4b89a926938093a10f64ac3a7b23cffb42c 100644 (file)
@@ -2895,9 +2895,9 @@ rechokeDownloads (tr_swarm * s)
         const double mult = MIN (timeSinceCancel, maxHistory) / (double) maxHistory;
         const int inc = maxIncrease * mult;
         maxPeers = s->maxPeers + inc;
-        tordbg (s, "time since last cancel is %"PRId64" -- increasing the "
+        tordbg (s, "time since last cancel is %"PRIdMAX" -- increasing the "
                    "number of peers we're interested in by %d",
-                   (long long)timeSinceCancel, inc);
+                   (intmax_t)timeSinceCancel, inc);
       }
   }
 
index 888c0c34854454c047e2960a34475272d596f106..91e8d67eb412db9ae48c44fe27e246368f519eff 100644 (file)
@@ -67,6 +67,14 @@ extern "C" {
  #endif
 #endif
 
+#ifndef PRIdMAX
+ #ifdef _WIN32
+  #define PRIdMAX "I64"
+ #else
+  #define PRIdMAX "jd"
+ #endif
+#endif
+
 #ifndef TR_PRIuSIZE
  #ifdef _WIN32
   #define TR_PRIuSIZE "Iu"