From 28fe36f1f81326ef00ba6504df6a98bf0d4ef1b3 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sat, 24 Aug 2013 17:53:45 +0000 Subject: [PATCH] #include limits.h where we use it, and don't where we don't --- gtk/details.c | 1 + gtk/file-list.c | 1 + gtk/torrent-cell-renderer.c | 1 + gtk/tr-prefs.c | 2 +- gtk/util.c | 1 + libtransmission/bandwidth.c | 1 - libtransmission/crypto.c | 1 - libtransmission/jsonsl.c | 1 - libtransmission/rpc-server.c | 1 - libtransmission/session.c | 1 + libtransmission/torrent.c | 1 + libtransmission/utils-test.c | 1 + qt/details.cc | 1 + qt/prefs-dialog.cc | 1 + 14 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gtk/details.c b/gtk/details.c index e54e23983..645fd8039 100644 --- a/gtk/details.c +++ b/gtk/details.c @@ -10,6 +10,7 @@ * $Id$ */ +#include /* INT_MAX */ #include #include /* sscanf () */ #include /* abort () */ diff --git a/gtk/file-list.c b/gtk/file-list.c index f37d7fd20..3e80d799e 100644 --- a/gtk/file-list.c +++ b/gtk/file-list.c @@ -10,6 +10,7 @@ * $Id$ */ +#include /* INT_MAX */ #include #include #include diff --git a/gtk/torrent-cell-renderer.c b/gtk/torrent-cell-renderer.c index b94b1209b..ba6493fbf 100644 --- a/gtk/torrent-cell-renderer.c +++ b/gtk/torrent-cell-renderer.c @@ -10,6 +10,7 @@ * $Id$ */ +#include /* INT_MAX */ #include #include #include diff --git a/gtk/tr-prefs.c b/gtk/tr-prefs.c index b6385760e..2d63601cc 100644 --- a/gtk/tr-prefs.c +++ b/gtk/tr-prefs.c @@ -11,7 +11,7 @@ */ #include /* isspace */ -#include /* USHRT_MAX */ +#include /* USHRT_MAX, INT_MAX */ #include #include #include diff --git a/gtk/util.c b/gtk/util.c index fe83f9ef4..484a7cd3d 100644 --- a/gtk/util.c +++ b/gtk/util.c @@ -12,6 +12,7 @@ #include /* isxdigit () */ #include +#include /* INT_MAX */ #include #include /* strchr (), strrchr (), strlen (), strstr () */ diff --git a/libtransmission/bandwidth.c b/libtransmission/bandwidth.c index 016159620..42a238273 100644 --- a/libtransmission/bandwidth.c +++ b/libtransmission/bandwidth.c @@ -11,7 +11,6 @@ */ #include -#include #include /* memset () */ #include "transmission.h" diff --git a/libtransmission/crypto.c b/libtransmission/crypto.c index 1b4b9d302..338e782de 100644 --- a/libtransmission/crypto.c +++ b/libtransmission/crypto.c @@ -12,7 +12,6 @@ #include #include /* uint8_t */ -#include /* INT_MAX */ #include #include /* abs () */ #include /* memcpy (), memset (), strcmp () */ diff --git a/libtransmission/jsonsl.c b/libtransmission/jsonsl.c index bde52a41f..e69d39405 100644 --- a/libtransmission/jsonsl.c +++ b/libtransmission/jsonsl.c @@ -26,7 +26,6 @@ #include "jsonsl.h" #include -#include #include #ifdef JSONSL_USE_METRICS diff --git a/libtransmission/rpc-server.c b/libtransmission/rpc-server.c index 8ccbcbe9b..a97a32c88 100644 --- a/libtransmission/rpc-server.c +++ b/libtransmission/rpc-server.c @@ -13,7 +13,6 @@ #include #include #include /* memcpy */ -#include /* INT_MAX */ #include /* close */ diff --git a/libtransmission/session.c b/libtransmission/session.c index 6d4984e7d..748647a0f 100644 --- a/libtransmission/session.c +++ b/libtransmission/session.c @@ -12,6 +12,7 @@ #include #include /* ENOENT */ +#include /* INT_MAX */ #include #include /* memcpy */ diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 5fecbbd90..cca3e063b 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -26,6 +26,7 @@ #include #include /* memcmp */ #include /* qsort */ +#include /* INT_MAX */ #include /* evutil_vsnprintf () */ diff --git a/libtransmission/utils-test.c b/libtransmission/utils-test.c index 8493ab74b..a4e1b9541 100644 --- a/libtransmission/utils-test.c +++ b/libtransmission/utils-test.c @@ -1,3 +1,4 @@ +#include /* INT_MAX */ #include /* sqrt () */ #include /* strlen () */ diff --git a/qt/details.cc b/qt/details.cc index 3d384c7a8..ef40f0a9c 100644 --- a/qt/details.cc +++ b/qt/details.cc @@ -11,6 +11,7 @@ */ #include +#include /* INT_MAX */ #include #include diff --git a/qt/prefs-dialog.cc b/qt/prefs-dialog.cc index 4474a97bc..5251de21f 100644 --- a/qt/prefs-dialog.cc +++ b/qt/prefs-dialog.cc @@ -11,6 +11,7 @@ */ #include +#include /* INT_MAX */ #include #include -- 2.40.0