1*31337658SMarcel Moolenaar# 2*31337658SMarcel Moolenaar# $Id$ 3*31337658SMarcel Moolenaar# 4*31337658SMarcel Moolenaar# Copyright 2011, Juniper Networks, Inc. 5*31337658SMarcel Moolenaar# All rights reserved. 6*31337658SMarcel Moolenaar# This SOFTWARE is licensed under the LICENSE provided in the 7*31337658SMarcel Moolenaar# ../Copyright file. By downloading, installing, copying, or otherwise 8*31337658SMarcel Moolenaar# using the SOFTWARE, you agree to be bound by the terms of that 9*31337658SMarcel Moolenaar# LICENSE. 10*31337658SMarcel Moolenaar# 11*31337658SMarcel Moolenaar# Commonly used sets of warnings 12*31337658SMarcel Moolenaar# 13*31337658SMarcel Moolenaar 14*31337658SMarcel MoolenaarMIN_WARNINGS?= -W -Wall 15*31337658SMarcel Moolenaar 16*31337658SMarcel MoolenaarLOW_WARNINGS?= ${MIN_WARNINGS} \ 17*31337658SMarcel Moolenaar -Wstrict-prototypes \ 18*31337658SMarcel Moolenaar -Wmissing-prototypes \ 19*31337658SMarcel Moolenaar -Wpointer-arith 20*31337658SMarcel Moolenaar 21*31337658SMarcel MoolenaarMEDIUM_WARNINGS?= ${LOW_WARNINGS} -Werror 22*31337658SMarcel Moolenaar 23*31337658SMarcel MoolenaarHIGH_WARNINGS?= ${MEDIUM_WARNINGS} \ 24*31337658SMarcel Moolenaar -Waggregate-return \ 25*31337658SMarcel Moolenaar -Wcast-align \ 26*31337658SMarcel Moolenaar -Wcast-qual \ 27*31337658SMarcel Moolenaar -Wchar-subscripts \ 28*31337658SMarcel Moolenaar -Wcomment \ 29*31337658SMarcel Moolenaar -Wformat \ 30*31337658SMarcel Moolenaar -Wimplicit \ 31*31337658SMarcel Moolenaar -Wmissing-declarations \ 32*31337658SMarcel Moolenaar -Wnested-externs \ 33*31337658SMarcel Moolenaar -Wparentheses \ 34*31337658SMarcel Moolenaar -Wreturn-type \ 35*31337658SMarcel Moolenaar -Wshadow \ 36*31337658SMarcel Moolenaar -Wswitch \ 37*31337658SMarcel Moolenaar -Wtrigraphs \ 38*31337658SMarcel Moolenaar -Wuninitialized \ 39*31337658SMarcel Moolenaar -Wunused \ 40*31337658SMarcel Moolenaar -Wwrite-strings 41*31337658SMarcel Moolenaar 42*31337658SMarcel MoolenaarHIGHER_WARNINGS?= ${HIGH_WARNINGS} \ 43*31337658SMarcel Moolenaar -Winline \ 44*31337658SMarcel Moolenaar -Wbad-function-cast \ 45*31337658SMarcel Moolenaar -Wpacked \ 46*31337658SMarcel Moolenaar -Wpadded \ 47*31337658SMarcel Moolenaar -Wstrict-aliasing 48*31337658SMarcel Moolenaar 49*31337658SMarcel Moolenaarifeq "${LIBXO_WARNINGS}" "HIGH" 50*31337658SMarcel MoolenaarWARNINGS += ${HIGH_WARNINGS} 51*31337658SMarcel Moolenaarelse 52*31337658SMarcel MoolenaarWARNINGS += ${LOW_WARNINGS} 53*31337658SMarcel Moolenaarendif 54*31337658SMarcel Moolenaar 55*31337658SMarcel Moolenaarifeq "${GCC_WARNINGS}" "yes" 56*31337658SMarcel MoolenaarWARNINGS += -fno-inline-functions-called-once 57*31337658SMarcel Moolenaarendif 58