Commit Graph

5 Commits

Author SHA1 Message Date
Neels Hofmeyr 950b8ea380 allow to terminate value_string[] with '{0}'
For a long time I was using '{}' to indicate a nulled out struct. But
apparently '{0}' is the favored way to write that. Let's allow using
this notation to terminate a value_string[].

Change-Id: Id2f5ba897ec83f34f8d3c4425353c0baf309bb6d
2022-02-18 14:04:13 +00:00
Harald Welte 8d0605c4fb verify_*.py: Ignore UTF-8 decoding errors
Some of our source files are inherited from other sources, particularly
for microcontroller firmware projects.  We cannot assume they're all
clean UTF-8.  Let's ignore any decoder errors when verifying log
statements and value_string arrays.

Closes: OS#4334
Change-Id: I1e19f4bc6bee46481c6ea743e8334bd4485909be
2019-12-17 13:19:12 +01:00
Neels Hofmeyr ec6aa1593f verify_value_string_arrays_are_terminated.py: allow dir args and no args
So far we call with a $(find . -name "*.[hc]") argument list, which might
become too long at some point. Rather include dir walking in the script itself
and allow passing dir arguments as well.

This is backwards compatible, calling with above file args still works.

Change-Id: I36456383906b6295c798b82aa131dda21f8efc02
2018-07-05 06:56:49 +00:00
Neels Hofmeyr 4a85bf4584 verify_value_string_arrays_are_terminated.py: allow terminating with '{}'
Writing '{ 0, NULL }' is actually identical to just '{}', and that's what I use
these days in all sorts of other contexts. So allow this notation as well in
the C code grepper.

Change-Id: I0822d2d997dccbfb31316953a7b6024c317d92cf
2018-06-16 13:46:41 +00:00
Max 81bde16fb0 Add value string termination check from libosmocore
The script by Neels Hofmeyr <nhofmeyr@sysmocom.de> has actually nothing
to do with libosmocore itself - it's a generic build-time check used by
jenkins so it should be part of this repo to avoid extra checkout of
libosmocore just for this script.

Change-Id: I079218b61f512975ec5bfc7dc23503ec369cbb5a
2017-08-18 18:08:16 +00:00