Skip to content

Commit

Permalink
Suppress wrong/buggy warning in MSVC <19.33
Browse files Browse the repository at this point in the history
  • Loading branch information
real-or-random authored and jonasnick committed Jul 27, 2023
1 parent 579999b commit 4c70cc9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/modules/extrakeys/main_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,19 @@ int secp256k1_pubkey_sort(const secp256k1_context* ctx, const secp256k1_pubkey *
ARG_CHECK(pubkeys != NULL);

cmp_data.ctx = ctx;

/* Suppress wrong warning (fixed in MSVC 19.33) */
#if defined(_MSC_VER) && (_MSC_VER < 1933)
#pragma warning(push)
#pragma warning(disable: 4090)
#endif

secp256k1_hsort(pubkeys, n_pubkeys, sizeof(*pubkeys), secp256k1_pubkey_sort_cmp, &cmp_data);

#if defined(_MSC_VER) && (_MSC_VER < 1933)
#pragma warning(pop)
#endif

return 1;
}

Expand Down

0 comments on commit 4c70cc9

Please sign in to comment.