Skip to content

Commit 1be9a7d

Browse files
committed
cleanup of warnings
1 parent d1fe18b commit 1be9a7d

5 files changed

Lines changed: 15 additions & 10 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Unity Test ![CI][]
22

3-
__Copyright (c) 2007 - 2024 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__
3+
__Copyright (c) 2007 - 2026 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__
44

55
Welcome to the Unity Test Project, one of the main projects of ThrowTheSwitch.org.
66
Unity Test is a unit testing framework built for C, with a focus on working with embedded toolchains.

auto/generate_test_runner.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,17 +239,15 @@ def count_tests(tests)
239239
if @options[:use_param_tests]
240240
idx = 0
241241
tests.each do |test|
242-
if (test[:args].nil? || test[:args].empty?)
242+
if test[:args].nil? || test[:args].empty?
243243
idx += 1
244244
else
245-
test[:args].each do |args|
246-
idx += 1
247-
end
245+
test[:args].each { idx += 1 }
248246
end
249247
end
250-
return idx
248+
idx
251249
else
252-
return tests.size
250+
tests.size
253251
end
254252
end
255253

auto/unity_test_summary.rb

100644100755
File mode changed.

src/unity.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,8 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
868868
const UNITY_DISPLAY_STYLE_T style,
869869
const UNITY_FLAGS_T flags)
870870
{
871+
UNITY_INT expect_val = 0;
872+
UNITY_INT actual_val = 0;
871873
UNITY_UINT32 elements = num_elements;
872874
unsigned int length = style & 0xF;
873875
unsigned int increment = 0;
@@ -895,9 +897,6 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
895897

896898
while ((elements > 0) && (elements--))
897899
{
898-
UNITY_INT expect_val;
899-
UNITY_INT actual_val;
900-
901900
switch (length)
902901
{
903902
case 1:

src/unity_internals.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ typedef enum
528528
#endif
529529
#endif
530530

531+
#if defined(__GNUC__) || defined(__clang__)
532+
#pragma GCC diagnostic push
533+
#pragma GCC diagnostic ignored "-Wpadded"
534+
#endif
531535
struct UNITY_STORAGE_T
532536
{
533537
const char* TestFile;
@@ -556,6 +560,9 @@ struct UNITY_STORAGE_T
556560
jmp_buf AbortFrame;
557561
#endif
558562
};
563+
#if defined(__GNUC__) || defined(__clang__)
564+
#pragma GCC diagnostic pop
565+
#endif
559566

560567
extern struct UNITY_STORAGE_T Unity;
561568

@@ -857,6 +864,7 @@ extern const char UnityStrErrFloat[];
857864
extern const char UnityStrErrDouble[];
858865
extern const char UnityStrErr64[];
859866
extern const char UnityStrErrShorthand[];
867+
extern const char UnityStrErrDetailStack[];
860868

861869
/*-------------------------------------------------------
862870
* Test Running Macros

0 commit comments

Comments
 (0)