Skip to content

Commit 76e0803

Browse files
committed
tweaks to clean up a couple warnings.
1 parent 9f8694c commit 76e0803

4 files changed

Lines changed: 7 additions & 8 deletions

File tree

examples/example_3/src/ProductionCode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ int FindFunction_WhichIsBroken(int NumberToFind)
1919
int i = 0;
2020
while (i < 8) //Notice I should have been in braces
2121
i++;
22-
if (NumbersToFind[i] == NumberToFind) //Yikes! I'm getting run after the loop finishes instead of during it!
23-
return i;
22+
if (NumbersToFind[i] == NumberToFind) //Yikes! I'm getting run after the loop finishes instead of during it!
23+
return i;
2424
return 0;
2525
}
2626

test/rakefile_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def build_command_string(hash, values, defines = nil)
107107
hash[:arguments].each do |arg|
108108
if arg.include? '$'
109109
if arg.include? '${5}'
110-
all_paths = [ File.join('..','src'), $extra_paths, 'src', File.join('tests'), File.join('testdata'), $cfg[:paths][:support] ].flatten.uniq.compact
110+
all_paths = [ File.join('..','src'), $extra_paths, File.join('tests'), File.join('testdata'), $cfg[:paths][:support] ].flatten.uniq.compact
111111
all_paths.each { |f| args << arg.gsub('${5}', f) }
112112

113113
elsif arg.include? '${6}'

test/targets/clang.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
:arguments:
6262
- "${1}"
6363
- "-lm"
64-
- "-m64"
6564
- "-o ${2}"
6665
:extension:
6766
:object: ".o"

test/tests/test_unity_parameterized.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,15 @@ TEST_MATRIX([2, 5l, 4u+3, 4ul], [-2, 3])
237237
void test_TwoMatrices(unsigned first, signed second)
238238
{
239239
static unsigned idx = 0;
240-
static const unsigned expected[] =
240+
static const signed expected[] =
241241
{
242242
// -2 3
243243
-4, 6, // 2
244244
-10, 15, // 5
245245
-14, 21, // 7
246246
-8, 12, // 4
247247
};
248-
TEST_ASSERT_EQUAL_INT(expected[idx++], first * second);
248+
TEST_ASSERT_EQUAL_INT(expected[idx++], (signed)first * second);
249249
}
250250

251251
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)
298298
TEST_ASSERT_EQUAL_CHAR(exp_char[char_idx], c);
299299

300300
char_idx = (char_idx + 1) % 6;
301-
if (char_idx == 0.0f)
301+
if ((float)char_idx == 0.0f)
302302
{
303303
float_idx = (float_idx + 1) % 3;
304-
if (float_idx == 0.0f)
304+
if ((float)float_idx == 0.0f)
305305
{
306306
enum_idx = (enum_idx + 1) % 3;
307307
}

0 commit comments

Comments
 (0)