Skip to content

Commit

Permalink
sources: silence compiler warning
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe committed Sep 5, 2024
1 parent 27e4cd0 commit 2ba727a
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 2ba727a

Please # to comment.