Skip to content
Snippets Groups Projects
Commit 7328be5b authored by Danny Auble's avatar Danny Auble
Browse files

Fix Typecasting issues

parent 30ec047b
No related branches found
No related tags found
No related merge requests found
...@@ -148,7 +148,7 @@ extern void print_fields_int(print_field_t *field, int value, int last) ...@@ -148,7 +148,7 @@ extern void print_fields_int(print_field_t *field, int value, int last)
{ {
int abs_len = abs(field->len); int abs_len = abs(field->len);
/* (value == unset) || (value == cleared) */ /* (value == unset) || (value == cleared) */
if ((value == NO_VAL) || (value == INFINITE)) { if ((value == (int)NO_VAL) || (value == (int)INFINITE)) {
if (print_fields_parsable_print if (print_fields_parsable_print
== PRINT_FIELDS_PARSABLE_NO_ENDING == PRINT_FIELDS_PARSABLE_NO_ENDING
&& last) && last)
...@@ -230,7 +230,7 @@ extern void print_fields_double(print_field_t *field, double value, int last) ...@@ -230,7 +230,7 @@ extern void print_fields_double(print_field_t *field, double value, int last)
{ {
int abs_len = abs(field->len); int abs_len = abs(field->len);
/* (value == unset) || (value == cleared) */ /* (value == unset) || (value == cleared) */
if ((value == NO_VAL) || (value == INFINITE)) { if ((value == (double)NO_VAL) || (value == (double)INFINITE)) {
if (print_fields_parsable_print if (print_fields_parsable_print
== PRINT_FIELDS_PARSABLE_NO_ENDING == PRINT_FIELDS_PARSABLE_NO_ENDING
&& last) && last)
...@@ -258,7 +258,8 @@ extern void print_fields_long_double( ...@@ -258,7 +258,8 @@ extern void print_fields_long_double(
{ {
int abs_len = abs(field->len); int abs_len = abs(field->len);
/* (value == unset) || (value == cleared) */ /* (value == unset) || (value == cleared) */
if ((value == NO_VAL) || (value == INFINITE)) { if ((value == (long double)NO_VAL)
|| (value == (long double)INFINITE)) {
if (print_fields_parsable_print if (print_fields_parsable_print
== PRINT_FIELDS_PARSABLE_NO_ENDING == PRINT_FIELDS_PARSABLE_NO_ENDING
&& last) && last)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment