On 7/12/23 21:57, Daniel Henrique Barboza wrote:
+#define ADD_CPU_PROPERTIES_ARRAY(_dev, _array) \ + for (prop = _array; prop && prop->name; prop++) { \ + qdev_property_add_static(_dev, prop); \ + } \
do { } while(0) Watch the \ on the last line of the macro. Declare the iterator within the macro, rather than use one defined in the outer scope. Why not use ARRAY_SIZE? r~