Skip to content

Commit c6d8d47

Browse files
committed
fix: unused variables
1 parent 57cf068 commit c6d8d47

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/libltfs/xml.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,21 @@ int xml_format_time(struct ltfs_timespec t, char** out);
143143
const int ntags_req = (num_req), ntags_opt = (num_opt); \
144144
bool have_required_tags[num_req], have_optional_tags[num_opt]; \
145145
memset(have_required_tags, 0, sizeof(have_required_tags)); \
146-
memset(have_optional_tags, 0, sizeof(have_optional_tags));
146+
memset(have_optional_tags, 0, sizeof(have_optional_tags)); \
147+
(void)ntags_opt
147148

148149
#define declare_tracking_arrays_no_opt(num_req) \
149150
const int ntags_req = (num_req), ntags_opt = (0); \
150151
bool have_required_tags[num_req]; \
151152
bool *have_optional_tags = NULL; \
152-
memset(have_required_tags, 0, sizeof(have_required_tags));
153+
memset(have_required_tags, 0, sizeof(have_required_tags)); \
154+
(void)ntags_req; (void)ntags_opt; (void)have_optional_tags
153155

154156
#define declare_tracking_arrays_no_tags() \
155157
const int ntags_req = (0), ntags_opt = (0); \
156158
bool *have_required_tags = NULL; \
157-
bool *have_optional_tags = NULL;
159+
bool *have_optional_tags = NULL; \
160+
(void)ntags_req; (void)ntags_opt; (void)have_required_tags; (void)have_optional_tags
158161

159162

160163
/* grab the next tag inside the given tag. It breaks if the end of the given tag is detected.

0 commit comments

Comments
 (0)