Skip to content

mdadm: fix gcc8 maybe-uninitialized/format-overflow warning#36

Open
sandy-lcq wants to merge 1 commit intoneilbrown:masterfrom
sandy-lcq:master
Open

mdadm: fix gcc8 maybe-uninitialized/format-overflow warning#36
sandy-lcq wants to merge 1 commit intoneilbrown:masterfrom
sandy-lcq:master

Conversation

@sandy-lcq
Copy link

while compiled with -Werror=maybe-uninitialized/-Werror=format-overflow=,
it failed

[snip]
| Incremental.c: In function 'Incremental_container':
| Incremental.c:1593:3: error: 'mdfd' may be used uninitialized in this function [-Werror=maybe-uninitialized]
| close(mdfd);
| ^~~~~~~~~~~

[snip]
super-intel.c: In function 'apply_takeover_update':
| super-intel.c:9615:15: error: '%d' directive writing between 1 and 11 bytes into a region of size 7 [-Werror=format-overflow=]
| " MISSING_%d", du->index);
| ^~

Signed-off-by: Changqing Li changqing.li@windriver.com

while compiled with -Werror=maybe-uninitialized/-Werror=format-overflow=,
it failed

[snip]
| Incremental.c: In function 'Incremental_container':
| Incremental.c:1593:3: error: 'mdfd' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|    close(mdfd);
|    ^~~~~~~~~~~

[snip]
 super-intel.c: In function 'apply_takeover_update':
| super-intel.c:9615:15: error: '%d' directive writing between 1 and 11 bytes into a region of size 7 [-Werror=format-overflow=]
|      " MISSING_%d", du->index);
|                ^~

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant