1
0
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:
Dave Wysochanski 2008-06-23 19:04:34 +00:00
parent 626dd7a5fe
commit 2d415cf9f8
3 changed files with 4 additions and 1 deletions

View File

@ -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.

View File

@ -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;

View File

@ -25,4 +25,6 @@
(void) (&_a == &_b); \
_a > _b ? _a : _b; })
#define uninitialized_var(x) x = x
#endif