-Wzero-as-null-pointer-constant issues

Discuss anything related to product development
Post Reply
seasoned_geek
Posts: 254
Joined: Thu Jun 11 2020 12:18 pm

-Wzero-as-null-pointer-constant issues

Post by seasoned_geek »

All,

I really wanted to clean up the use of NULL in my gede port. I honestly think it is causing a problem under CopperSpice that Qt simply ignores. Don't know for absolute certainty because I can't examine a string . . . that would be the reason for the port in the first place.

At any rate, when this is forced into the compilation options

Code: Select all

In file included from /home/roland/sf_projects/redbug/src/aboutdialog.cpp:9:
/home/roland/sf_projects/redbug/src/aboutdialog.h:21:5: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
   21 |     CS_OBJECT( AboutDialog )
      |     ^~~~~~~~~
/home/roland/sf_projects/redbug/src/aboutdialog.h:21:5: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
Are there plans to clean this up or is it an artifact we have to live with? When I'm thrust into someone else's code that has problems, I really like this switch. I would have thought the C++17 standard would have forced the warning in. I thought it was a default as part of C++11 with gnu.
barbara
Posts: 446
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: -Wzero-as-null-pointer-constant issues

Post by barbara »

Sounds like we may have a place where there is a 0 and it should be nullptr. If you can locate this issue we are happy to make the change.

Barbara
seasoned_geek
Posts: 254
Joined: Thu Jun 11 2020 12:18 pm

Re: -Wzero-as-null-pointer-constant issues

Post by seasoned_geek »

Without doing any in-depth testing, these are the places I found where csobject_macro.h uses a 0 for a pointer.

Code: Select all

#ifdef QT_NO_TEXTCODEC
# define CS_TR_FUNCTIONS \
   static inline QString tr(const char *s, const char *c = 0, int n = -1) \
      { return staticMetaObject().tr(s, c, n); }
#else
# define CS_TR_FUNCTIONS \
   static inline QString tr(const char *s, const char *c = 0, int n = -1) \
      { return staticMetaObject().tr(s, c, n); } \
   static inline QString trUtf8(const char *s, const char *c = 0, int n = -1) \
      { return staticMetaObject().trUtf8(s, c, n); }
#endif
They have nothing to do with this issue, just turned up with search.

I will look around in all my old notes. I was at a shop that had macro Hell going on. Wrote up instructions on how to command line compile one module with the proper switches to get a source listing with full macro expansion. That's the only way one will find this with nested macros.
seasoned_geek
Posts: 254
Joined: Thu Jun 11 2020 12:18 pm

Re: -Wzero-as-null-pointer-constant issues

Post by seasoned_geek »

Some of this might be due to the the hacky way I had to compile for the listing. It do appear to be way more than one spot.

Code: Select all

roland@roland-HP-EliteDesk-800-G2-SFF:~/sf_projects/redbug_scraps$ g++ -std=c++17 -Wzero-as-null-pointer-constant -I /usr/lib/cs_lib/include/QtCore -I /usr/lib/cs_lib/include/QtGui -I ../redbug/src -o a.lst settings.cpp
In file included from /usr/lib/cs_lib/include/QtCore/qstring8.h:32,
                 from /usr/lib/cs_lib/include/QtCore/qstring.h:1,
                 from /usr/lib/cs_lib/include/QtCore/QString:1,
                 from settings.h:12,
                 from settings.cpp:9:
/usr/lib/cs_lib/include/QtCore/qbytearray.h:355:29: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  355 |    short toShort(bool *ok = 0, int base = 10) const;
      |                             ^
/usr/lib/cs_lib/include/QtCore/qbytearray.h:356:31: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  356 |    ushort toUShort(bool *ok = 0, int base = 10) const;
      |                               ^
/usr/lib/cs_lib/include/QtCore/qbytearray.h:357:25: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  357 |    int toInt(bool *ok = 0, int base = 10) const;
      |                         ^
/usr/lib/cs_lib/include/QtCore/qbytearray.h:358:27: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  358 |    uint toUInt(bool *ok = 0, int base = 10) const;
      |                           ^
/usr/lib/cs_lib/include/QtCore/qbytearray.h:359:27: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  359 |    long toLong(bool *ok = 0, int base = 10) const;
      |                           ^
/usr/lib/cs_lib/include/QtCore/qbytearray.h:360:29: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  360 |    ulong toULong(bool *ok = 0, int base = 10) const;
      |                             ^
/usr/lib/cs_lib/include/QtCore/qbytearray.h:361:33: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  361 |    qint64 toLongLong(bool *ok = 0, int base = 10) const;
      |                                 ^
/usr/lib/cs_lib/include/QtCore/qbytearray.h:362:35: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  362 |    quint64 toULongLong(bool *ok = 0, int base = 10) const;
      |                                   ^
/usr/lib/cs_lib/include/QtCore/qbytearray.h:363:29: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  363 |    float toFloat(bool *ok = 0) const;
      |                             ^
/usr/lib/cs_lib/include/QtCore/qbytearray.h:364:31: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  364 |    double toDouble(bool *ok = 0) const;
      |                               ^
In file included from /usr/lib/cs_lib/include/QtCore/csmeta.h:28,
                 from /usr/lib/cs_lib/include/QtCore/qmetaobject.h:30,
                 from /usr/lib/cs_lib/include/QtCore/qobject.h:32,
                 from /usr/lib/cs_lib/include/QtCore/qvariant.h:25,
                 from /usr/lib/cs_lib/include/QtCore/qlocale.h:27,
                 from /usr/lib/cs_lib/include/QtCore/qstringparser.h:30,
                 from /usr/lib/cs_lib/include/QtCore/qstring.h:2,
                 from /usr/lib/cs_lib/include/QtCore/QString:1,
                 from settings.h:12,
                 from settings.cpp:9:
/usr/lib/cs_lib/include/QtCore/csmeta_internal_1.h:444:53: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  444 |                   CSGenericReturnArgument *retval = 0) const = 0;
      |                                                     ^
In file included from /usr/lib/cs_lib/include/QtCore/qmetaobject.h:34,
                 from /usr/lib/cs_lib/include/QtCore/qobject.h:32,
                 from /usr/lib/cs_lib/include/QtCore/qvariant.h:25,
                 from /usr/lib/cs_lib/include/QtCore/qlocale.h:27,
                 from /usr/lib/cs_lib/include/QtCore/qstringparser.h:30,
                 from /usr/lib/cs_lib/include/QtCore/qstring.h:2,
                 from /usr/lib/cs_lib/include/QtCore/QString:1,
                 from settings.h:12,
                 from settings.cpp:9:
/usr/lib/cs_lib/include/QtCore/qmutex.h: In member function ‘void QBasicMutex::unlock()’:
/usr/lib/cs_lib/include/QtCore/qmutex.h:46:51: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
   46 |       if (!d_ptr.testAndSetRelease(dummyLocked(), 0)) {
      |                                                   ^
/usr/lib/cs_lib/include/QtCore/qmutex.h: In member function ‘bool QBasicMutex::fastTryLock()’:
/usr/lib/cs_lib/include/QtCore/qmutex.h:59:38: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
   59 |       return d_ptr.testAndSetAcquire(0, dummyLocked());
      |                                      ^
In file included from /usr/lib/cs_lib/include/QtCore/qobject.h:32,
                 from /usr/lib/cs_lib/include/QtCore/qvariant.h:25,
                 from /usr/lib/cs_lib/include/QtCore/qlocale.h:27,
                 from /usr/lib/cs_lib/include/QtCore/qstringparser.h:30,
                 from /usr/lib/cs_lib/include/QtCore/qstring.h:2,
                 from /usr/lib/cs_lib/include/QtCore/QString:1,
                 from settings.h:12,
                 from settings.cpp:9:
/usr/lib/cs_lib/include/QtCore/qmetaobject.h: At global scope:
/usr/lib/cs_lib/include/QtCore/qmetaobject.h:90:46: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
   90 |    QString tr(const char *s, const char *c = 0, int n = -1) const;
      |                                              ^
/usr/lib/cs_lib/include/QtCore/qmetaobject.h:91:50: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
   91 |    QString trUtf8(const char *s, const char *c = 0, int n = -1) const;
      |                                                  ^
In file included from /usr/lib/cs_lib/include/QtCore/qobject.h:32,
                 from /usr/lib/cs_lib/include/QtCore/qvariant.h:25,
                 from /usr/lib/cs_lib/include/QtCore/qlocale.h:27,
                 from /usr/lib/cs_lib/include/QtCore/qstringparser.h:30,
                 from /usr/lib/cs_lib/include/QtCore/qstring.h:2,
                 from /usr/lib/cs_lib/include/QtCore/QString:1,
                 from settings.h:12,
                 from settings.cpp:9:
/usr/lib/cs_lib/include/QtCore/qmetaobject.h: In member function ‘const QMetaObject* QMetaObject_T<T>::superClass() const [with T = QObject]’:
/usr/lib/cs_lib/include/QtCore/qmetaobject.h:330:11: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  330 |    return 0;
      |           ^
In file included from /usr/lib/cs_lib/include/QtCore/qnamespace.h:28,
                 from /usr/lib/cs_lib/include/QtCore/qbytearray.h:33,
                 from /usr/lib/cs_lib/include/QtCore/qstring8.h:32,
                 from /usr/lib/cs_lib/include/QtCore/qstring.h:1,
                 from /usr/lib/cs_lib/include/QtCore/QString:1,
                 from settings.h:12,
                 from settings.cpp:9:
/usr/lib/cs_lib/include/QtCore/qobject.h: At global scope:
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:105:60: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  105 |    static inline QString tr(const char *s, const char *c = 0, int n = -1) \
      |                                                            ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:858:64: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  858 | #define CORE_CS_OBJECT_INTERNAL(className)                     CS_OBJECT_INTERNAL_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qobject.h:91:4: note: in expansion of macro ‘CORE_CS_OBJECT_INTERNAL’
   91 |    CORE_CS_OBJECT_INTERNAL(QObject)
      |    ^~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:107:64: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  107 |    static inline QString trUtf8(const char *s, const char *c = 0, int n = -1) \
      |                                                                ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:858:64: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  858 | #define CORE_CS_OBJECT_INTERNAL(className)                     CS_OBJECT_INTERNAL_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qobject.h:91:4: note: in expansion of macro ‘CORE_CS_OBJECT_INTERNAL’
   91 |    CORE_CS_OBJECT_INTERNAL(QObject)
      |    ^~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:105:60: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  105 |    static inline QString tr(const char *s, const char *c = 0, int n = -1) \
      |                                                            ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:265:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  265 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:220:7: note: in expansion of macro ‘CS_GADGET_INTERNAL_OUTSIDE’
  220 |       CS_GADGET_INTERNAL_OUTSIDE(classNameX)    \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:859:64: note: in expansion of macro ‘CS_GADGET_OUTSIDE’
  859 | #define CORE_CS_GADGET(className)                              CS_GADGET_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qcoreevent.h:41:4: note: in expansion of macro ‘CORE_CS_GADGET’
   41 |    CORE_CS_GADGET(QEvent)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:107:64: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  107 |    static inline QString trUtf8(const char *s, const char *c = 0, int n = -1) \
      |                                                                ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:265:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  265 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:220:7: note: in expansion of macro ‘CS_GADGET_INTERNAL_OUTSIDE’
  220 |       CS_GADGET_INTERNAL_OUTSIDE(classNameX)    \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:859:64: note: in expansion of macro ‘CS_GADGET_OUTSIDE’
  859 | #define CORE_CS_GADGET(className)                              CS_GADGET_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qcoreevent.h:41:4: note: in expansion of macro ‘CORE_CS_GADGET’
   41 |    CORE_CS_GADGET(QEvent)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:105:60: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  105 |    static inline QString tr(const char *s, const char *c = 0, int n = -1) \
      |                                                            ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:131:7: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  131 |       CS_OBJECT_INTERNAL_OUTSIDE(classNameX)   \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:856:64: note: in expansion of macro ‘CS_OBJECT_OUTSIDE’
  856 | #define CORE_CS_OBJECT(className)                              CS_OBJECT_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qeventloop.h:36:4: note: in expansion of macro ‘CORE_CS_OBJECT’
   36 |    CORE_CS_OBJECT(QEventLoop)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:107:64: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  107 |    static inline QString trUtf8(const char *s, const char *c = 0, int n = -1) \
      |                                                                ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:131:7: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  131 |       CS_OBJECT_INTERNAL_OUTSIDE(classNameX)   \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:856:64: note: in expansion of macro ‘CS_OBJECT_OUTSIDE’
  856 | #define CORE_CS_OBJECT(className)                              CS_OBJECT_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qeventloop.h:36:4: note: in expansion of macro ‘CORE_CS_OBJECT’
   36 |    CORE_CS_OBJECT(QEventLoop)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:105:60: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  105 |    static inline QString tr(const char *s, const char *c = 0, int n = -1) \
      |                                                            ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:131:7: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  131 |       CS_OBJECT_INTERNAL_OUTSIDE(classNameX)   \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:856:64: note: in expansion of macro ‘CS_OBJECT_OUTSIDE’
  856 | #define CORE_CS_OBJECT(className)                              CS_OBJECT_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qcoreapplication.h:50:4: note: in expansion of macro ‘CORE_CS_OBJECT’
   50 |    CORE_CS_OBJECT(QCoreApplication)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:107:64: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  107 |    static inline QString trUtf8(const char *s, const char *c = 0, int n = -1) \
      |                                                                ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:131:7: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  131 |       CS_OBJECT_INTERNAL_OUTSIDE(classNameX)   \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:856:64: note: in expansion of macro ‘CS_OBJECT_OUTSIDE’
  856 | #define CORE_CS_OBJECT(className)                              CS_OBJECT_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qcoreapplication.h:50:4: note: in expansion of macro ‘CORE_CS_OBJECT’
   50 |    CORE_CS_OBJECT(QCoreApplication)
      |    ^~~~~~~~~~~~~~
In file included from /usr/lib/cs_lib/include/QtCore/csobject_internal.h:28,
                 from /usr/lib/cs_lib/include/QtCore/qobject.h:607,
                 from /usr/lib/cs_lib/include/QtCore/qvariant.h:25,
                 from /usr/lib/cs_lib/include/QtCore/qlocale.h:27,
                 from /usr/lib/cs_lib/include/QtCore/qstringparser.h:30,
                 from /usr/lib/cs_lib/include/QtCore/qstring.h:2,
                 from /usr/lib/cs_lib/include/QtCore/QString:1,
                 from settings.h:12,
                 from settings.cpp:9:
/usr/lib/cs_lib/include/QtCore/csmeta_callevent.h:34:85: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
   34 |                    const QObject *sender, int signal_index, QSemaphore *semaphore = 0);
      |                                                                                     ^
In file included from /usr/lib/cs_lib/include/QtCore/qnamespace.h:28,
                 from /usr/lib/cs_lib/include/QtCore/qbytearray.h:33,
                 from /usr/lib/cs_lib/include/QtCore/qstring8.h:32,
                 from /usr/lib/cs_lib/include/QtCore/qstring.h:1,
                 from /usr/lib/cs_lib/include/QtCore/QString:1,
                 from settings.h:12,
                 from settings.cpp:9:
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:105:60: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  105 |    static inline QString tr(const char *s, const char *c = 0, int n = -1) \
      |                                                            ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:131:7: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  131 |       CS_OBJECT_INTERNAL_OUTSIDE(classNameX)   \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:856:64: note: in expansion of macro ‘CS_OBJECT_OUTSIDE’
  856 | #define CORE_CS_OBJECT(className)                              CS_OBJECT_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qthread.h:40:4: note: in expansion of macro ‘CORE_CS_OBJECT’
   40 |    CORE_CS_OBJECT(QThread)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:107:64: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  107 |    static inline QString trUtf8(const char *s, const char *c = 0, int n = -1) \
      |                                                                ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:131:7: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  131 |       CS_OBJECT_INTERNAL_OUTSIDE(classNameX)   \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:856:64: note: in expansion of macro ‘CS_OBJECT_OUTSIDE’
  856 | #define CORE_CS_OBJECT(className)                              CS_OBJECT_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qthread.h:40:4: note: in expansion of macro ‘CORE_CS_OBJECT’
   40 |    CORE_CS_OBJECT(QThread)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:105:60: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  105 |    static inline QString tr(const char *s, const char *c = 0, int n = -1) \
      |                                                            ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:265:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  265 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:220:7: note: in expansion of macro ‘CS_GADGET_INTERNAL_OUTSIDE’
  220 |       CS_GADGET_INTERNAL_OUTSIDE(classNameX)    \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:859:64: note: in expansion of macro ‘CS_GADGET_OUTSIDE’
  859 | #define CORE_CS_GADGET(className)                              CS_GADGET_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qlocale.h:38:4: note: in expansion of macro ‘CORE_CS_GADGET’
   38 |    CORE_CS_GADGET(QLocale)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:107:64: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  107 |    static inline QString trUtf8(const char *s, const char *c = 0, int n = -1) \
      |                                                                ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:265:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  265 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:220:7: note: in expansion of macro ‘CS_GADGET_INTERNAL_OUTSIDE’
  220 |       CS_GADGET_INTERNAL_OUTSIDE(classNameX)    \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:859:64: note: in expansion of macro ‘CS_GADGET_OUTSIDE’
  859 | #define CORE_CS_GADGET(className)                              CS_GADGET_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qlocale.h:38:4: note: in expansion of macro ‘CORE_CS_GADGET’
   38 |    CORE_CS_GADGET(QLocale)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:105:60: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  105 |    static inline QString tr(const char *s, const char *c = 0, int n = -1) \
      |                                                            ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:131:7: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  131 |       CS_OBJECT_INTERNAL_OUTSIDE(classNameX)   \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:856:64: note: in expansion of macro ‘CS_OBJECT_OUTSIDE’
  856 | #define CORE_CS_OBJECT(className)                              CS_OBJECT_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qiodevice.h:41:4: note: in expansion of macro ‘CORE_CS_OBJECT’
   41 |    CORE_CS_OBJECT(QIODevice)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:107:64: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  107 |    static inline QString trUtf8(const char *s, const char *c = 0, int n = -1) \
      |                                                                ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:131:7: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  131 |       CS_OBJECT_INTERNAL_OUTSIDE(classNameX)   \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:856:64: note: in expansion of macro ‘CS_OBJECT_OUTSIDE’
  856 | #define CORE_CS_OBJECT(className)                              CS_OBJECT_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qiodevice.h:41:4: note: in expansion of macro ‘CORE_CS_OBJECT’
   41 |    CORE_CS_OBJECT(QIODevice)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:105:60: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  105 |    static inline QString tr(const char *s, const char *c = 0, int n = -1) \
      |                                                            ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:131:7: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  131 |       CS_OBJECT_INTERNAL_OUTSIDE(classNameX)   \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:856:64: note: in expansion of macro ‘CS_OBJECT_OUTSIDE’
  856 | #define CORE_CS_OBJECT(className)                              CS_OBJECT_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qfiledevice.h:34:4: note: in expansion of macro ‘CORE_CS_OBJECT’
   34 |    CORE_CS_OBJECT(QFileDevice)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:107:64: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  107 |    static inline QString trUtf8(const char *s, const char *c = 0, int n = -1) \
      |                                                                ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:131:7: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  131 |       CS_OBJECT_INTERNAL_OUTSIDE(classNameX)   \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:856:64: note: in expansion of macro ‘CS_OBJECT_OUTSIDE’
  856 | #define CORE_CS_OBJECT(className)                              CS_OBJECT_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qfiledevice.h:34:4: note: in expansion of macro ‘CORE_CS_OBJECT’
   34 |    CORE_CS_OBJECT(QFileDevice)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:105:60: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  105 |    static inline QString tr(const char *s, const char *c = 0, int n = -1) \
      |                                                            ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:131:7: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  131 |       CS_OBJECT_INTERNAL_OUTSIDE(classNameX)   \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:856:64: note: in expansion of macro ‘CS_OBJECT_OUTSIDE’
  856 | #define CORE_CS_OBJECT(className)                              CS_OBJECT_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qfile.h:40:4: note: in expansion of macro ‘CORE_CS_OBJECT’
   40 |    CORE_CS_OBJECT(QFile)
      |    ^~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:107:64: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  107 |    static inline QString trUtf8(const char *s, const char *c = 0, int n = -1) \
      |                                                                ^
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:204:7: note: in expansion of macro ‘CS_TR_FUNCTIONS’
  204 |       CS_TR_FUNCTIONS \
      |       ^~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:131:7: note: in expansion of macro ‘CS_OBJECT_INTERNAL_OUTSIDE’
  131 |       CS_OBJECT_INTERNAL_OUTSIDE(classNameX)   \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/csobject_macro.h:856:64: note: in expansion of macro ‘CS_OBJECT_OUTSIDE’
  856 | #define CORE_CS_OBJECT(className)                              CS_OBJECT_OUTSIDE(className)
      |                                                                ^~~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtCore/qfile.h:40:4: note: in expansion of macro ‘CORE_CS_OBJECT’
   40 |    CORE_CS_OBJECT(QFile)
      |    ^~~~~~~~~~~~~~
In file included from /usr/lib/cs_lib/include/QtCore/regex/r_states.h:32,
                 from /usr/lib/cs_lib/include/QtCore/regex/regex.h:31,
                 from /usr/lib/cs_lib/include/QtCore/qregularexpression.h:27,
                 from /usr/lib/cs_lib/include/QtCore/qdatastream.h:31,
                 from /usr/lib/cs_lib/include/QtCore/qpair.h:28,
                 from /usr/lib/cs_lib/include/QtCore/qhashfunc.h:28,
                 from /usr/lib/cs_lib/include/QtCore/qhash.h:31,
                 from /usr/lib/cs_lib/include/QtCore/qdebug.h:28,
                 from /usr/lib/cs_lib/include/QtCore/QDebug:1,
                 from ../redbug/src/log.h:12,
                 from settings.cpp:15:
/usr/lib/cs_lib/include/QtCore/regex/regex_raw_buffer.h: In constructor ‘cs_regex_ns::cs_regex_detail_ns::raw_storage::raw_storage()’:
/usr/lib/cs_lib/include/QtCore/regex/regex_raw_buffer.h:157:25: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  157 |    last = start = end = 0;
      |                         ^
In file included from /usr/lib/cs_lib/include/QtCore/regex/perl_matcher.h:608,
                 from /usr/lib/cs_lib/include/QtCore/regex/regex_match.h:30,
                 from /usr/lib/cs_lib/include/QtCore/regex/regex.h:44,
                 from /usr/lib/cs_lib/include/QtCore/qregularexpression.h:27,
                 from /usr/lib/cs_lib/include/QtCore/qdatastream.h:31,
                 from /usr/lib/cs_lib/include/QtCore/qpair.h:28,
                 from /usr/lib/cs_lib/include/QtCore/qhashfunc.h:28,
                 from /usr/lib/cs_lib/include/QtCore/qhash.h:31,
                 from /usr/lib/cs_lib/include/QtCore/qdebug.h:28,
                 from /usr/lib/cs_lib/include/QtCore/QDebug:1,
                 from ../redbug/src/log.h:12,
                 from settings.cpp:15:
/usr/lib/cs_lib/include/QtCore/regex/perl_matcher_non_recursive.h: In destructor ‘cs_regex_ns::cs_regex_detail_ns::save_state_init::~save_state_init()’:
/usr/lib/cs_lib/include/QtCore/regex/perl_matcher_non_recursive.h:130:16: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  130 |       *stack = 0;
      |                ^
In file included from /usr/lib/cs_lib/include/QtCore/qdebug.h:34,
                 from /usr/lib/cs_lib/include/QtCore/QDebug:1,
                 from ../redbug/src/log.h:12,
                 from settings.cpp:15:
/usr/lib/cs_lib/include/QtCore/qtextstream.h: In constructor ‘QTextStreamManipulator::QTextStreamManipulator(QTSMFI, int)’:
/usr/lib/cs_lib/include/QtCore/qtextstream.h:223:19: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  223 |       : mf(m), mc(0), arg(a)
      |                   ^
/usr/lib/cs_lib/include/QtCore/qtextstream.h: In constructor ‘QTextStreamManipulator::QTextStreamManipulator(QTSMFC, QChar)’:
/usr/lib/cs_lib/include/QtCore/qtextstream.h:227:12: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
  227 |       : mf(0), mc(m), arg(-1), ch(c)
      |            ^
settings.cpp: In member function ‘void Settings::loadGlobalConfig()’:
settings.cpp:145:60: error: expected ‘,’ or ‘;’ before ‘GLOBAL_CONFIG_DIR’
  145 |     QString globalConfigFilename = QDir::homePath() + "/"  GLOBAL_CONFIG_DIR + "/" + GLOBAL_CONFIG_FILENAME;
      |                                                            ^~~~~~~~~~~~~~~~~
settings.cpp: In member function ‘void Settings::loadProjectConfig()’:
settings.cpp:266:42: error: expected ‘;’ before ‘GLOBAL_CONFIG_DIR’
  266 |         filepath = QDir::homePath() + "/"  GLOBAL_CONFIG_DIR + "/" + PROJECT_GLOBAL_CONFIG_FILENAME;
      |                                          ^ ~~~~~~~~~~~~~~~~~
      |                                          ;
settings.cpp: In member function ‘void Settings::saveProjectConfig()’:
settings.cpp:364:42: error: expected ‘;’ before ‘GLOBAL_CONFIG_DIR’
  364 |         filepath = QDir::homePath() + "/"  GLOBAL_CONFIG_DIR + "/" + PROJECT_GLOBAL_CONFIG_FILENAME;
      |                                          ^ ~~~~~~~~~~~~~~~~~
      |                                          ;
settings.cpp: In member function ‘void Settings::saveGlobalConfig()’:
settings.cpp:426:60: error: expected ‘,’ or ‘;’ before ‘GLOBAL_CONFIG_DIR’
  426 |     QString globalConfigFilename = QDir::homePath() + "/"  GLOBAL_CONFIG_DIR + "/" + GLOBAL_CONFIG_FILENAME;
      |                                                            ^~~~~~~~~~~~~~~~~
roland@roland-HP-EliteDesk-800-G2-SFF:~/sf_projects/redbug_scraps$ 
Post Reply