mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add uninitialized_var macro to suppress invalid compiler warnings.
One such warning is seen on fedora9 gcc compiler: /metadata.c:1923: warning: 'results' may be used uninitialized in this function
This commit is contained in:
parent
626dd7a5fe
commit
2d415cf9f8
@ -1,5 +1,6 @@
|
||||
Version 2.02.39 -
|
||||
================================
|
||||
Add uninitialzed_var() macro to suppress invalid compiler warnings.
|
||||
Suppress 'sb_offset' compiler warning by using enum for md minor sb version.
|
||||
lvm2_run: Don't return uninitialized "ret" for _memlock_inc or _memlock_dec.
|
||||
Avoid link failure when configuring without --enable-cmdlib.
|
||||
|
@ -1920,7 +1920,7 @@ struct list *get_vgids(struct cmd_context *cmd, int full_scan)
|
||||
static int _get_pvs(struct cmd_context *cmd, struct list **pvslist)
|
||||
{
|
||||
struct str_list *strl;
|
||||
struct list *results;
|
||||
struct list * uninitialized_var(results);
|
||||
const char *vgname, *vgid;
|
||||
struct list *pvh, *tmp;
|
||||
struct list *vgids;
|
||||
|
@ -25,4 +25,6 @@
|
||||
(void) (&_a == &_b); \
|
||||
_a > _b ? _a : _b; })
|
||||
|
||||
#define uninitialized_var(x) x = x
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user