How to get rid of Warning C4142 in a visual studio project?

  Uncategorised

In my project, I am using a third party stack that includes a header file containing typedefs. My project also contains a header file that contains the same typedefs. I am getting the following warning in visual studio.

1. Warning C4142 ‘int32_t’: benign redefinition of type

2. Warning C4142 ‘uint32_t’: benign redefinition of type

third_party_stack.h contains

typedef signed long     int32_t;    /* Signed 32 bit data       */
typedef unsigned long   uint32_t;   /* Unsigned 32 bit data     */

My project includes stdint.h which contains this

typedef int                int32_t;
typedef unsigned int       uint32_t;

In my project I am including the headers in this order

My_project.h
third_party_stack.h

What should I do in order to get rid of the warning (I am using C language). Thanks.

Source: Visual Studio Questions

LEAVE A COMMENT