Skip to content

Commit 4ca98b8

Browse files
authored
Suppress compiler warning C4232 (function pointer to dll symbol) for MSVC. (#266)
1 parent b5587a8 commit 4ca98b8

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

include/aws/http/private/h2_frames.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ AWS_HTTP_API
6464
extern const uint32_t aws_h2_settings_initial[AWS_HTTP2_SETTINGS_END_RANGE];
6565

6666
/* This magic string must be the very first thing a client sends to the server.
67-
* See RFC-7540 3.5 - HTTP/2 Connection Preface */
67+
* See RFC-7540 3.5 - HTTP/2 Connection Preface.
68+
* Exported for tests */
69+
AWS_HTTP_API
6870
extern const struct aws_byte_cursor aws_h2_connection_preface_client_string;
6971

7072
/**

source/connection.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#if _MSC_VER
2424
# pragma warning(disable : 4204) /* non-constant aggregate initializer */
25+
# pragma warning(disable : 4232) /* function pointer to dll symbol */
2526
#endif
2627

2728
static struct aws_http_connection_system_vtable s_default_system_vtable = {

source/connection_manager.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
#include <aws/common/mutex.h>
2424
#include <aws/common/string.h>
2525

26+
#if _MSC_VER
27+
# pragma warning(disable : 4232) /* function pointer to dll symbol */
28+
#endif
29+
2630
/*
2731
* Established connections not currently in use are tracked via this structure.
2832
*/

source/h2_frames.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323

2424
#define ENCODER_LOG(level, encoder, text) ENCODER_LOGF(level, encoder, "%s", text)
2525

26-
/* exported for tests */
27-
AWS_HTTP_API const struct aws_byte_cursor aws_h2_connection_preface_client_string =
26+
const struct aws_byte_cursor aws_h2_connection_preface_client_string =
2827
AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n");
2928

3029
/* Initial values and bounds are from RFC-7540 6.5.2 */

source/proxy_connection.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#if _MSC_VER
1818
# pragma warning(disable : 4204) /* non-constant aggregate initializer */
19+
# pragma warning(disable : 4232) /* function pointer to dll symbol */
1920
#endif
2021

2122
AWS_STATIC_STRING_FROM_LITERAL(s_host_header_name, "Host");

0 commit comments

Comments
 (0)