]> git.ipfire.org Git - thirdparty/mdadm.git/commit
super-intel: fix compilation error
authorKinga Stefaniuk <kinga.stefaniuk@intel.com>
Tue, 6 Aug 2024 09:14:02 +0000 (11:14 +0200)
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Tue, 6 Aug 2024 11:53:54 +0000 (13:53 +0200)
commit734de8b02022bf3b7a5f2111f5314a87ddebcc83
treef6af0dcfad639cd69f2f95a1f4677bed549c6033
parent483ff037f1036f5f604e085cf76097a87e2be348
super-intel: fix compilation error

Fix compilation error:

super-intel.c: In function ‘end_migration’:
super-intel.c:4360:29: error: writing 2 bytes into a region
of size 0 [-Werror=stringop-overflow=]
 4360 |         dev->vol.migr_state = 0;
      |         ~~~~~~~~~~~~~~~~~~~~^~~
cc1: note: destination object is likely at address zero
cc1: all warnings being treated as errors
make: *** [Makefile:232: super-intel.o] Error 1

reported, when GCC 14 is used. Return when dev is NULL, to avoid it.

Signed-off-by: Kinga Stefaniuk <kinga.stefaniuk@intel.com>
super-intel.c