Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8263718

unused-result warning happens at os_linux.cpp

XMLWordPrintable

    • b19
    • linux

        I tried to build OpenJDK with g++-10.2.1_pre1-r3 on Alpine Linux 3.13.2, but I saw following warning:

        /home/jdk/github-forked/jdk/src/hotspot/os/linux/os_linux.cpp:668:9: error: ignoring return value of 'void* __builtin_alloca(long unsigned int)' declared with attribute 'warn_unused_result' [-Werror=unused-result]
          668 | alloca(((pid ^ counter++) & 7) * 128);
              | ^
        cc1plus: all warnings being treated as errors

              ysuenaga Yasumasa Suenaga
              ysuenaga Yasumasa Suenaga
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: