Fix warnings found by splint (#324)

* Fix warnings found by splint

* Ignore Win32 Builder warnings about possible data loss for integers.

* Fix Windows build warnings

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2022-08-17 23:23:26 -05:00
committed by GitHub
parent 8cddaa5881
commit c8671d54f7
15 changed files with 79 additions and 51 deletions
+4 -2
View File
@@ -91,6 +91,7 @@ int main(int argc, char *argv[])
struct mstimer print_value_timer = { 0 };
float float_value = 0.0;
bool bool_value = false;
unsigned object_type = 0;
uint32_t unsigned_value = 0;
/* data from the command line */
unsigned long print_seconds = 10;
@@ -132,11 +133,12 @@ int main(int argc, char *argv[])
target_device_object_instance = strtol(argv[argi], NULL, 0);
target_args++;
} else if (target_args == 1) {
if (bactext_object_type_strtol(
argv[argi], &target_object_type) == false) {
if (bactext_object_type_strtol(argv[argi], &object_type) ==
false) {
fprintf(stderr, "object-type=%s invalid\n", argv[argi]);
return 1;
}
target_object_type = object_type;
target_args++;
} else if (target_args == 2) {
target_object_instance = strtol(argv[argi], NULL, 0);