Skip to content

Commit

Permalink
empty compound literal is forbidden by MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuho committed Apr 5, 2021
1 parent cf0fe98 commit 90a744b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/picotls.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ static void test_select_cipher(void)
*candidates[] = {&ptls_minicrypto_chacha20poly1305sha256, &ptls_minicrypto_aes128gcmsha256, NULL};

{
static const uint8_t input[] = {};
ok(select_cipher(&selected, candidates, input, input, 0) == PTLS_ALERT_HANDSHAKE_FAILURE);
static const uint8_t input; /* `input[0]` is preferable, but prohibited by MSVC */
ok(select_cipher(&selected, candidates, &input, &input, 0) == PTLS_ALERT_HANDSHAKE_FAILURE);
}

{
Expand Down

0 comments on commit 90a744b

Please sign in to comment.