Skip to content

Commit

Permalink
Merge pull request #136 from giuseppe/silence-compiler
Browse files Browse the repository at this point in the history
sources: silence compiler warning
  • Loading branch information
giuseppe authored Sep 5, 2024
2 parents 27e4cd0 + 2ba727a commit 0ced6ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ocispec/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ def make_clone(obj, c_file, prefix):

c_file.append(f"{typename} *\nclone_{typename} ({typename} *src)\n")
c_file.append("{\n")
c_file.append(" (void) src; /* Silence compiler warning. */\n")
c_file.append(f" __auto_cleanup(free_{typename}) {typename} *ret = NULL;\n")

c_file.append(" ret = calloc (1, sizeof (*ret));\n")
Expand Down

0 comments on commit 0ced6ad

Please # to comment.