Skip to content

Commit

Permalink
Fix compiler warnings when xattr is not enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Feb 17, 2015
1 parent fcf0025 commit 5eedbe2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/filed/fd_plugins.c
Expand Up @@ -1319,7 +1319,9 @@ bxattr_exit_code plugin_build_xattr_streams(JCR *jcr,
FF_PKT *ff_pkt)
{
Plugin *plugin;
#if defined(HAVE_XATTR)
alist *xattr_value_list = NULL;
#endif
bxattr_exit_code retval = bxattr_exit_error;

Dmsg0(dbglvl, "plugin_build_xattr_streams\n");
Expand Down Expand Up @@ -1451,18 +1453,20 @@ bxattr_exit_code plugin_parse_xattr_streams(JCR *jcr,
char *content,
uint32_t content_length)
{
#if defined(HAVE_XATTR)
Plugin *plugin;
alist *xattr_value_list = NULL;
#endif
bxattr_exit_code retval = bxattr_exit_error;

Dmsg0(dbglvl, "plugin_parse_xattr_streams\n");

if (!jcr->plugin_ctx) {
return bxattr_exit_ok;
}
plugin = (Plugin *)jcr->plugin_ctx->plugin;

#if defined(HAVE_XATTR)
plugin = (Plugin *)jcr->plugin_ctx->plugin;
if (plug_func(plugin)->setXattr != NULL) {
xattr_t *current_xattr;
struct xattr_pkt xp;
Expand Down Expand Up @@ -1497,9 +1501,7 @@ bxattr_exit_code plugin_parse_xattr_streams(JCR *jcr,

retval = bxattr_exit_ok;
}
#endif

#if defined(HAVE_XATTR)
bail_out:
if (xattr_value_list) {
xattr_drop_internal_table(xattr_value_list);
Expand Down

0 comments on commit 5eedbe2

Please sign in to comment.