Enable a few warning flags

Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
Antonio Niño Díaz
2018-04-01 02:09:20 +01:00
parent 85ece88268
commit 340362d984
8 changed files with 49 additions and 34 deletions

View File

@@ -6,6 +6,7 @@
* SPDX-License-Identifier: MIT
*/
#include <float.h>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
@@ -483,7 +484,7 @@ int main(int argc, char *argv[])
if (CurrentOptions.verbose) {
printf("Success! %u lines in %d.%02d seconds ", nTotalLines,
(int)timespent, ((int)(timespent * 100.0)) % 100);
if (timespent == 0)
if (timespent < FLT_MIN_EXP)
printf("(INFINITY lines/minute)\n");
else
printf("(%d lines/minute)\n",