sheredom / utest.h

🧪 single header unit testing framework for C and C++
The Unlicense
834 stars 57 forks source link

Fix directive output truncated writing 4 bytes into a region of size 1. #140

Closed aganm closed 10 months ago

aganm commented 11 months ago

Fixes an error that gcc gives me when -Wformat-truncation=2 is enabled.

utest.h:1135:36: error: ‘%s’ directive output truncated writing 4 bytes into a region of size 1 [-Werror=format-truncation=]
  1135 |     UTEST_SNPRINTF(name, name_size, "%s", name_part);
       |                                      ^~~~
sheredom commented 10 months ago

Thanks again for your contributions!