tweaks to clean up a couple warnings.

This commit is contained in:
Mark VanderVoord
2026-07-07 15:37:06 -04:00
parent 9f8694c04c
commit 76e0803cb4
4 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -19,8 +19,8 @@ int FindFunction_WhichIsBroken(int NumberToFind)
int i = 0; int i = 0;
while (i < 8) //Notice I should have been in braces while (i < 8) //Notice I should have been in braces
i++; i++;
if (NumbersToFind[i] == NumberToFind) //Yikes! I'm getting run after the loop finishes instead of during it! if (NumbersToFind[i] == NumberToFind) //Yikes! I'm getting run after the loop finishes instead of during it!
return i; return i;
return 0; return 0;
} }
+1 -1
View File
@@ -107,7 +107,7 @@ module RakefileHelpers
hash[:arguments].each do |arg| hash[:arguments].each do |arg|
if arg.include? '$' if arg.include? '$'
if arg.include? '${5}' if arg.include? '${5}'
all_paths = [ File.join('..','src'), $extra_paths, 'src', File.join('tests'), File.join('testdata'), $cfg[:paths][:support] ].flatten.uniq.compact all_paths = [ File.join('..','src'), $extra_paths, File.join('tests'), File.join('testdata'), $cfg[:paths][:support] ].flatten.uniq.compact
all_paths.each { |f| args << arg.gsub('${5}', f) } all_paths.each { |f| args << arg.gsub('${5}', f) }
elsif arg.include? '${6}' elsif arg.include? '${6}'
-1
View File
@@ -61,7 +61,6 @@
:arguments: :arguments:
- "${1}" - "${1}"
- "-lm" - "-lm"
- "-m64"
- "-o ${2}" - "-o ${2}"
:extension: :extension:
:object: ".o" :object: ".o"
+4 -4
View File
@@ -237,7 +237,7 @@ TEST_MATRIX([2, 5l, 4u+3, 4ul], [-2, 3])
void test_TwoMatrices(unsigned first, signed second) void test_TwoMatrices(unsigned first, signed second)
{ {
static unsigned idx = 0; static unsigned idx = 0;
static const unsigned expected[] = static const signed expected[] =
{ {
// -2 3 // -2 3
-4, 6, // 2 -4, 6, // 2
@@ -245,7 +245,7 @@ void test_TwoMatrices(unsigned first, signed second)
-14, 21, // 7 -14, 21, // 7
-8, 12, // 4 -8, 12, // 4
}; };
TEST_ASSERT_EQUAL_INT(expected[idx++], first * second); TEST_ASSERT_EQUAL_INT(expected[idx++], (signed)first * second);
} }
TEST_MATRIX(["String1", "String,2", "Stri" "ng3", "String[4]", "String\"5\""], [-5, 12.5f]) TEST_MATRIX(["String1", "String,2", "Stri" "ng3", "String[4]", "String\"5\""], [-5, 12.5f])
@@ -298,10 +298,10 @@ void test_EnumCharAndArrayMatrices(test_enum_t e, float n, char c)
TEST_ASSERT_EQUAL_CHAR(exp_char[char_idx], c); TEST_ASSERT_EQUAL_CHAR(exp_char[char_idx], c);
char_idx = (char_idx + 1) % 6; char_idx = (char_idx + 1) % 6;
if (char_idx == 0.0f) if ((float)char_idx == 0.0f)
{ {
float_idx = (float_idx + 1) % 3; float_idx = (float_idx + 1) % 3;
if (float_idx == 0.0f) if ((float)float_idx == 0.0f)
{ {
enum_idx = (enum_idx + 1) % 3; enum_idx = (enum_idx + 1) % 3;
} }