Disable gcc deprecation warnings in places where we can't don anything about it
This commit is contained in:
parent
ec09ad81be
commit
6e30dee3d3
6
Dir.cpp
6
Dir.cpp
@ -70,6 +70,11 @@ bool Dir::open ( ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
//Disable deprecated-declarations about use of readdir_r(). the glib maintainers deprecate readdir_r() because the linux
|
||||
//version of readdir() is thread-safe. But the maintainers didn't think of other platforms, so that deprecation is
|
||||
//linux-centric and not portable.
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
const char *Dir::getNextFilename(const char *pattern) {
|
||||
if (!m_dir) {
|
||||
log("dir: m_dir is NULL so can't find pattern %s", pattern);
|
||||
@ -91,3 +96,4 @@ const char *Dir::getNextFilename(const char *pattern) {
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
5
Mem.cpp
5
Mem.cpp
@ -133,6 +133,10 @@ void Mem::delnew ( void *ptr , size_t size , const char *note ) {
|
||||
return;
|
||||
}
|
||||
|
||||
//dynamic throw(...) may be deprecated by the signatures for new and new[] must be exactly like this
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated"
|
||||
|
||||
// . global override of new and delete operators
|
||||
// . seems like constructor and destructor are still called
|
||||
// . just use to check if enough memory
|
||||
@ -208,6 +212,7 @@ void * operator new [] (size_t size) throw (std::bad_alloc) {
|
||||
|
||||
return mem;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
||||
Mem::Mem() {
|
||||
|
Loading…
Reference in New Issue
Block a user