[tor/master] Fix a compiler warning on windows when sizeof(long)==sizeof(int)

12 May
2016
12 May
'16
6:51 p.m.
commit 44cbd00dfaba8314dea274d5c4535adc3c202220 Author: Nick Mathewson <nickm@torproject.org> Date: Thu May 12 14:51:38 2016 -0400 Fix a compiler warning on windows when sizeof(long)==sizeof(int) --- src/common/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/util.c b/src/common/util.c index d290f54..d1c8b2e 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -3273,8 +3273,10 @@ tor_vsscanf(const char *buf, const char *pattern, va_list ap) *out = lng; } else { int *out = va_arg(ap, int *); +#if LONG_MAX > INT_MAX if (lng < INT_MIN || lng > INT_MAX) return n_matched; +#endif *out = (int)lng; } ++pattern;
3296
Age (days ago)
3296
Last active (days ago)
0 comments
1 participants
participants (1)
-
nickm@torproject.org