Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kpartx/devmapper.c: fix build errors caused by -Werror on unused variables #23

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions kpartx/devmapper.c
Expand Up @@ -18,6 +18,12 @@
#define MAX_PREFIX_LEN (_UUID_PREFIX_LEN + 4)
#define PARAMS_SIZE 1024

#ifdef LIBDM_API_COOKIE
# define __DM_API_COOKIE_UNUSED__ /* empty */
#else
# define __DM_API_COOKIE_UNUSED__ __attribute__((unused))
#endif

int dm_prereq(char * str, uint32_t x, uint32_t y, uint32_t z)
{
int r = 1;
Expand Down Expand Up @@ -55,12 +61,12 @@ int dm_prereq(char * str, uint32_t x, uint32_t y, uint32_t z)
return r;
}

int dm_simplecmd(int task, const char *name, int no_flush, uint16_t udev_flags)
int dm_simplecmd(int task, const char *name, int no_flush, __DM_API_COOKIE_UNUSED__ uint16_t udev_flags)
{
int r = 0;
#ifdef LIBDM_API_COOKIE
int udev_wait_flag = (task == DM_DEVICE_RESUME ||
task == DM_DEVICE_REMOVE);
#ifdef LIBDM_API_COOKIE
uint32_t cookie = 0;
#endif
struct dm_task *dmt;
Expand Down