From that point of view, the static_assert is highly
questionable in
openbsc.git
I'm glad that we have the assert, otherwise we would be writing past the
array's end without noticing now...
IMHO the way to update the enum is to have all patches on gerrit and collect +2
on them. Once the libosmocore part is merged, the openbsc one shall follow as
soon as possible, unfortunately having to wait for the V+1 first.
We could fix one part of this in general with a kind of LAST_ENTRY enum val in
the sense of
enum vals {
VAL1,
VAL2,
LAST
};
struct s {
int arr[LAST];
};
(where 's' stands for gsm_network)
Then the gsm_network struct size would of course change implicitly, depending
on the .h file from libosmocore.
But then it's still not possible to use the newly added enum values in the
openbsc.git (to extend those other const arrays), so a two-part commit is still
needed for this particular patch. --> move the const arrays to libosmocore?
What did you have in mind?
~N
--
- Neels Hofmeyr <nhofmeyr(a)sysmocom.de>
http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschäftsführer / Managing Directors: Harald Welte