Skip to content

Conversation

vrahane
Copy link
Contributor

@vrahane vrahane commented Dec 15, 2017

  • The defines(_BSD_SOURCE, _DEFAULT_SOURCE) were getting defined in multiple source files
    generating warnings
  • Solution is to conditionally define the above
  • These were seen when making changes for Tinycbor mynewt upstream #83
9.2/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.9.2/lib -o tst_cpp.o tst_cpp.cpp
In file included from tst_cpp.cpp:27:
./../../src/cborencoder.c:25:9: warning: '_BSD_SOURCE' macro redefined [-Wmacro-redefined]
#define _BSD_SOURCE 1
        ^
../../src/compilersupport_p.h:35:11: note: previous definition is here
#  define _BSD_SOURCE
          ^
In file included from tst_cpp.cpp:27:
./../../src/cborencoder.c:26:9: warning: '_DEFAULT_SOURCE' macro redefined [-Wmacro-redefined]
#define _DEFAULT_SOURCE 1
        ^
../../src/compilersupport_p.h:38:11: note: previous definition is here
#  define _DEFAULT_SOURCE
          ^
2 warnings generated.

- The defines(_BSD_SOURCE, _DEFAULT_SOURCE) were getting defined in multiple source files generating
  warnings
- Solution is to conditionally define the above
@thiagomacieira thiagomacieira merged commit 650c31f into intel:master Dec 17, 2017
@vrahane vrahane deleted the tinycbor_tst_cpp_warning branch December 17, 2017 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants