diff options
author | Grigori Goronzy <greg@kinoho.net> | 2014-01-24 17:27:03 -0800 |
---|---|---|
committer | Grigori Goronzy <greg@kinoho.net> | 2014-01-24 17:27:03 -0800 |
commit | 7ddbda8dbdeb681cee27604ba1872c33acaf4dfe (patch) | |
tree | 7da091415c3ae7cd0a1bfa570c198b28cc64a7fc | |
parent | 65a934a254ed457920d8fb7e4cae9f6de8ee83d5 (diff) | |
parent | 43707d29a025428eab9a1c690e142b42d15247e3 (diff) | |
download | libass-7ddbda8dbdeb681cee27604ba1872c33acaf4dfe.tar.bz2 libass-7ddbda8dbdeb681cee27604ba1872c33acaf4dfe.tar.xz |
Merge pull request #26 from wm4/warnings
Use more warning flags
-rw-r--r-- | libass/Makefile.am | 4 | ||||
-rw-r--r-- | libass/ass_strtod.c | 15 |
2 files changed, 11 insertions, 8 deletions
diff --git a/libass/Makefile.am b/libass/Makefile.am index b134a66..524d9a8 100644 --- a/libass/Makefile.am +++ b/libass/Makefile.am @@ -1,4 +1,6 @@ -AM_CFLAGS = -Wall +AM_CFLAGS = -std=gnu99 -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter \ + -Werror-implicit-function-declaration -Wstrict-prototypes \ + -Wpointer-arith -Wredundant-decls LIBASS_LT_CURRENT = 5 LIBASS_LT_REVISION = 0 diff --git a/libass/ass_strtod.c b/libass/ass_strtod.c index f55b37a..4e96404 100644 --- a/libass/ass_strtod.c +++ b/libass/ass_strtod.c @@ -16,15 +16,15 @@ #include <ctype.h> #include <errno.h> -const -static int maxExponent = 511; /* Largest possible base 10 exponent. Any +static +const int maxExponent = 511; /* Largest possible base 10 exponent. Any * exponent larger than this will already * produce underflow or overflow, so there's * no need to worry about additional digits. */ -const -static double powersOf10[] = { /* Table giving binary powers of 10. Entry */ +static +const double powersOf10[] = { /* Table giving binary powers of 10. Entry */ 10., /* is 10^2^i. Used to convert decimal */ 100., /* exponents into floating-point numbers. */ 1.0e4, @@ -58,8 +58,8 @@ static double powersOf10[] = { /* Table giving binary powers of 10. Entry */ */ double -ass_strtod(string, endPtr) - const char *string; /* A decimal ASCII floating-point number, +ass_strtod( + const char *string, /* A decimal ASCII floating-point number, * optionally preceded by white space. * Must have form "-I.FE-X", where I is the * integer part of the mantissa, F is the @@ -71,8 +71,9 @@ ass_strtod(string, endPtr) * The "E" may actually be an "e". E and X * may both be omitted (but not just one). */ - char **endPtr; /* If non-NULL, store terminating character's + char **endPtr /* If non-NULL, store terminating character's * address here. */ + ) { int sign, expSign = 0; double fraction, dblExp, *d; |