Am 09.12.25 um 22:00 schrieb Stefan Weil:

This fixes a compiler error when higher warning levels are enabled:

../migration/postcopy-ram.c: In function ‘postcopy_temp_pages_setup’:
../migration/postcopy-ram.c:1483:50: error: ‘g_malloc0_n’ sizes specified with 
‘sizeof’ in the earlier argument and not in the later argument 
[-Werror=calloc-transposed-args]
  1483 |     mis->postcopy_tmp_pages = g_malloc0_n(sizeof(PostcopyTmpPage), 
channels);
       |                                                  ^~~~~~~~~~~~~~~
../migration/postcopy-ram.c:1483:50: note: earlier argument should specify 
number of elements, later size of each element

Avoid also a related int/unsigned mismatch by fixing the type of
two local variables.

Signed-off-by: Stefan Weil <[email protected]>
---

v2: Replace g_malloc0_n by g_new0.

Thanks for all comments and reviews.

Stefan


This patch is no longer needed (already queued from Philippe's e-mail), so just ignore it.

Thanks, Stefan W.


Reply via email to