Fix ODR violation

When building with LTO, the compiler warns about a violation of the ODR.
This commit fixes the two competing places by moving the structs into
anonymous namespaces.
This commit is contained in:
Flössie
2016-05-18 20:57:46 +02:00
parent 39bedf026c
commit 53f03bd00c
2 changed files with 7 additions and 0 deletions

View File

@@ -32,6 +32,8 @@
/* Expanded data source object for stdio input */
namespace
{
typedef struct {
struct jpeg_source_mgr pub; /* public fields */
@@ -44,6 +46,8 @@ typedef struct {
typedef my_source_mgr * my_src_ptr;
}
#define INPUT_BUF_SIZE 4096 /* choose an efficiently fread'able size */

View File

@@ -26,6 +26,8 @@
/* Expanded data source object for memory input */
namespace
{
typedef struct {
struct jpeg_source_mgr pub; /* public fields */
@@ -36,6 +38,7 @@ typedef struct {
typedef my_source_mgr * my_src_ptr;
}
/*
* Initialize source --- called by jpeg_read_header