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:
@@ -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 */
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user