Skip to content

Commit

Permalink
Merge pull request #1840 from kacfengine/unused_variable_warnings
Browse files Browse the repository at this point in the history
Fix some "unused variable" warnings.
  • Loading branch information
kacf committed Jul 14, 2014
2 parents 5948a6f + 8654ef5 commit 411be96
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libenv/zones.c
Expand Up @@ -85,7 +85,7 @@ bool ForeignZone(char *s)
# endif
return false;
}
int CurrentZoneName(const char *s)
int CurrentZoneName(ARG_UNUSED const char *s)
{
# ifdef HAVE_GETZONEID
zoneid_t zid = getzoneid();
Expand Down
7 changes: 5 additions & 2 deletions libpromises/files_hashes.c
Expand Up @@ -202,8 +202,11 @@ char *HashPrintSafe(char *dst, size_t dst_size, const unsigned char *digest,
size_t digest_len = HashSizeFromId(type);
assert(dst_size >= strlen(prefix) + digest_len*2 + 1);

size_t ret = StringBytesToHex(&dst[dst_len], dst_size - dst_len,
digest, digest_len);
#ifndef NDEBUG // Avoids warning.
size_t ret =
#endif
StringBytesToHex(&dst[dst_len], dst_size - dst_len,
digest, digest_len);
assert(ret == 2 * digest_len);

#if 0 /* TODO return proper exit status and check it in the callers */
Expand Down
2 changes: 1 addition & 1 deletion libpromises/generic_agent.c
Expand Up @@ -754,7 +754,7 @@ static bool MissingInputFile(const char *input_file)
}

// Git only.
static bool GeneratePolicyReleaseIDFromGit(char *release_id_out, size_t out_size,
static bool GeneratePolicyReleaseIDFromGit(char *release_id_out, ARG_UNUSED size_t out_size,
const char *policy_dir)
{
char git_filename[PATH_MAX + 1];
Expand Down

0 comments on commit 411be96

Please sign in to comment.