Skip to content

Commit 6f565d7

Browse files
committed
Update signature of callback function in light of recent changes
1 parent 8165ca5 commit 6f565d7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sxbp/render_figure_to_svg.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,15 @@ static sxbp_result_t sxbp_write_svg_body_origin_dot(
170170
return SXBP_RESULT_OK;
171171
}
172172

173+
/*
174+
* disable GCC warning about the unused parameter, as this is a callback it must
175+
* include all arguments specified by the caller, even if not used
176+
*/
177+
#pragma GCC diagnostic push
178+
#pragma GCC diagnostic ignored "-Wunused-parameter"
173179
// private, callback function for sxbp_write_svg_body_figure_line()
174180
static bool sxbp_render_figure_to_bitmap_callback(
181+
sxbp_line_t* line,
175182
sxbp_co_ord_t location,
176183
void* callback_data
177184
) {
@@ -241,6 +248,8 @@ static bool sxbp_render_figure_to_bitmap_callback(
241248
data->current_point++;
242249
return true;
243250
}
251+
// reënable all warnings
252+
#pragma GCC diagnostic pop
244253

245254
/*
246255
* private, given a figure and a buffer, writes out the SVG code for the

0 commit comments

Comments
 (0)