diff --git a/src/devices/imagedev/diablo.cpp b/src/devices/imagedev/diablo.cpp index 2becfdf8bd1..64e313865bf 100644 --- a/src/devices/imagedev/diablo.cpp +++ b/src/devices/imagedev/diablo.cpp @@ -114,6 +114,7 @@ bool diablo_image_device::call_create(int create_format, util::option_resolution UINT32 sectorsize, hunksize; UINT32 cylinders, heads, sectors, totalsectors; + assert_always(create_args != nullptr, "Expected create_args to not be nullptr"); cylinders = create_args->lookup_int('C'); heads = create_args->lookup_int('H'); sectors = create_args->lookup_int('S'); diff --git a/src/devices/imagedev/harddriv.cpp b/src/devices/imagedev/harddriv.cpp index 87a6c758f38..42eeac477be 100644 --- a/src/devices/imagedev/harddriv.cpp +++ b/src/devices/imagedev/harddriv.cpp @@ -138,6 +138,7 @@ bool harddisk_image_device::call_create(int create_format, util::option_resoluti UINT32 sectorsize, hunksize; UINT32 cylinders, heads, sectors, totalsectors; + assert_always(create_args != nullptr, "Expected create_args to not be nullptr"); cylinders = create_args->lookup_int('C'); heads = create_args->lookup_int('H'); sectors = create_args->lookup_int('S'); diff --git a/src/lib/util/opresolv.cpp b/src/lib/util/opresolv.cpp index dabbbbc3334..7abe600cd65 100644 --- a/src/lib/util/opresolv.cpp +++ b/src/lib/util/opresolv.cpp @@ -437,9 +437,9 @@ const option_guide *option_resolution::index_option(int indx) const // count_options // ------------------------------------------------- -int option_resolution::count_options(const option_guide *guide, const char *specification) +size_t option_resolution::count_options(const option_guide *guide, const char *specification) { - int option_count = 0; + size_t option_count = 0; while(guide->option_type != OPTIONTYPE_END) { diff --git a/src/lib/util/opresolv.h b/src/lib/util/opresolv.h index 37c5339f02b..5faf615b30b 100644 --- a/src/lib/util/opresolv.h +++ b/src/lib/util/opresolv.h @@ -123,7 +123,7 @@ public: const option_guide *index_option(int indx) const; // processing option guides - static int count_options(const option_guide *guide, const char *specification); + static size_t count_options(const option_guide *guide, const char *specification); // processing option specifications static error list_ranges(const char *specification, int option_char,