Skip to content

Commit

Permalink
fix: initialize local variable to prevent c4701 warning on windows arm (
Browse files Browse the repository at this point in the history
#1122)

* Prevent c4701 warning on windows arm

* comment that init has no semantic meaning

---------

Co-authored-by: Mischan Toosarani-Hausberger <[email protected]>
  • Loading branch information
jkosberg and supervacuus authored Jan 23, 2025
1 parent 56198fc commit 57c38d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sentry_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,9 @@ sentry__roll_dice(double probability)
sentry_uuid_t
sentry__capture_event(sentry_value_t event)
{
sentry_uuid_t event_id;
// `event_id` is only used as an argument to pure output parameters.
// Initialization only happens to prevent compiler warnings.
sentry_uuid_t event_id = sentry_uuid_nil();
sentry_envelope_t *envelope = NULL;

bool was_captured = false;
Expand Down

0 comments on commit 57c38d9

Please sign in to comment.