Skip to content

Commit 650c31f

Browse files
vrahanethiagomacieira
authored andcommitted
Fix compiler warnings for tst_cpp
- The defines(_BSD_SOURCE, _DEFAULT_SOURCE) were getting defined in multiple source files generating warnings - Solution is to conditionally define the above
1 parent 19b26bd commit 650c31f

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/cborencoder.c

+4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@
2222
**
2323
****************************************************************************/
2424

25+
#ifndef _BSD_SOURCE
2526
#define _BSD_SOURCE 1
27+
#endif
28+
#ifndef _DEFAULT_SOURCE
2629
#define _DEFAULT_SOURCE 1
30+
#endif
2731
#ifndef __STDC_LIMIT_MACROS
2832
# define __STDC_LIMIT_MACROS 1
2933
#endif

src/cborparser.c

+4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@
2222
**
2323
****************************************************************************/
2424

25+
#ifndef _BSD_SOURCE
2526
#define _BSD_SOURCE 1
27+
#endif
28+
#ifndef _DEFAULT_SOURCE
2629
#define _DEFAULT_SOURCE 1
30+
#endif
2731
#ifndef __STDC_LIMIT_MACROS
2832
# define __STDC_LIMIT_MACROS 1
2933
#endif

src/cborparser_dup_string.c

+4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@
2222
**
2323
****************************************************************************/
2424

25+
#ifndef _BSD_SOURCE
2526
#define _BSD_SOURCE 1
27+
#endif
28+
#ifndef _DEFAULT_SOURCE
2629
#define _DEFAULT_SOURCE 1
30+
#endif
2731
#ifndef __STDC_LIMIT_MACROS
2832
# define __STDC_LIMIT_MACROS 1
2933
#endif

0 commit comments

Comments
 (0)