haproxy/contrib-iprange-compliler-warnings.patch

35 lines
960 B
Diff
Raw Normal View History

2018-01-05 15:32:17 +00:00
From 84c6a66cdb51bd5a279ab35216bb6f0710e2a626 Mon Sep 17 00:00:00 2001
From: Ryan O'Hara <rohara@redhat.com>
Date: Fri, 15 Dec 2017 09:58:09 -0600
Subject: [PATCH 1/2] Fix compiler warning in iprange.c
The declaration of main() in iprange.c did not specify a type, causing
a compiler warning [-Wimplicit-int]. This patch simply declares main()
to be type 'int' and calls exit(0) at the end of the function.
---
contrib/iprange/iprange.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/iprange/iprange.c b/contrib/iprange/iprange.c
index 91690c77..abae0076 100644
--- a/contrib/iprange/iprange.c
+++ b/contrib/iprange/iprange.c
@@ -111,7 +111,7 @@ static void usage(const char *argv0)
"\n", argv0);
}
-main(int argc, char **argv)
+int main(int argc, char **argv)
{
char line[MAXLINE];
int l, lnum;
@@ -198,4 +198,5 @@ main(int argc, char **argv)
convert_range(sa, da, he, NULL);
}
}
+ exit(0);
}
--
2.14.2