Skip to content

Build warnings since glibc-2.43 #290

Description

@heitbaum
In constructor 'libconfig::SettingException::SettingException(const char*)',
    inlined from 'libconfig::SettingNotFoundException::SettingNotFoundException(const char*)' at libconfigcpp.c++:314:26,
    inlined from 'const libconfig::Setting& libconfig::Setting::getParent() const' at libconfigcpp.c++:1132:40:
libconfigcpp.c++:195:19: warning: argument 1 null where non-null expected [-Wnonnull]
  195 |   _path = ::strdup(path);
      |           ~~~~~~~~^~~~~~
In file included from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/cstring:48,
                 from libconfigcpp.c++:34:
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/string.h: In function 'const libconfig::Setting& libconfig::Setting::getParent() const':
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/string.h:202:14: note: in a call to function 'char* strdup(const char*)' declared 'nonnull'
  202 | extern char *strdup (const char *__s)
      |              ^~~~~~
In constructor 'libconfig::SettingException::SettingException(const char*)',
    inlined from 'libconfig::SettingNotFoundException::SettingNotFoundException(const char*)' at libconfigcpp.c++:314:26,
    inlined from 'libconfig::Setting& libconfig::Setting::getParent()' at libconfigcpp.c++:1144:40:
libconfigcpp.c++:195:19: warning: argument 1 null where non-null expected [-Wnonnull]
  195 |   _path = ::strdup(path);
      |           ~~~~~~~~^~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/string.h: In member function 'libconfig::Setting& libconfig::Setting::getParent()':
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/string.h:202:14: note: in a call to function 'char* strdup(const char*)' declared 'nonnull'
  202 | extern char *strdup (const char *__s)
      |              ^~~~~~

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions