mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
maint: avoid "attribute-const"-suggesting warning from gcc
* gl/lib/fadvise.c: Use a pragma to turn off this warning option:
-Wsuggest-attribute=const. Without this change, building with
--enable-gcc-warnings would evoke this error:
lib/fadvise.c:25:1: error: function might be candidate for\
attribute 'const' [-Werror=suggest-attribute=const]
This commit is contained in:
1 parent
42d2377b81
commit
4f211822dd
1 file changed
+6
@@ -14,6 +14,12 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Without this pragma, gcc suggests that (given !HAVE_POSIX_FADVISE)
|
||||
the the fdadvise function might be candidate for attribute 'const'. */
|
||||
#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
#include "fadvise.h"
|
||||
|
||||
|
||||
Reference in new issue
Block a user