Re: [libvirt] [PATCH v4 1/5] virerror: Make it easier to add new error number

2020-01-10 Thread Erik Skultety
On Thu, Jan 09, 2020 at 01:45:56PM +0100, Michal Privoznik wrote: > In v5.0.0-rc1~94 we switched from one huge switch() to an array > for translating error numbers into error messages. However, the > array is declared to have VIR_ERR_NUMBER_LAST items which makes > it impossible to spot this place

[libvirt] [PATCH v4 1/5] virerror: Make it easier to add new error number

2020-01-09 Thread Michal Privoznik
In v5.0.0-rc1~94 we switched from one huge switch() to an array for translating error numbers into error messages. However, the array is declared to have VIR_ERR_NUMBER_LAST items which makes it impossible to spot this place by compile checking when adding new error number. Signed-off-by: Michal P