Skip to contentSkip to conversation

librelp: Pass Wno-error to compiler

PATCH In review Khem Raj 2 participants 2 messages Jul 20, 2019 – Jul 22, 2019

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 librelp: Pass Wno-error to compiler

After autoconf-archive was upgraded to 2019.01.06 it started to add extra warning flags via WARN_CFLAGS along with -Werror which means that now compiler could be stricter and break the build if any of the new warnings are flagged

The difference is

old

WARN_CFLAGS='-fno-strict-aliasing -Wimplicit-function-declaration -Wold-style-definition -Wjump-misses-init -Werror -Wno-suggest-attribute=format -Wunused-parameter -Wmissing-field-initializers'

new

WARN_CFLAGS='-fno-strict-aliasing -Wimplicit-function-declaration -Wold-style-definition -Wjump-misses-init -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wswitch-enum -Wswitch-default -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wdouble-promotion -pedantic -Wunused-parameter -Wmissing-field-initializers -Werror -Wno-suggest-attribute=format -Wunused-parameter -Wmissing-field-initializers'

Hence we started seing build failure like https://errors.yoctoproject.org/Errors/Details/252684/

This fix just turns off warnings-as-errors so build can still go on, if we need to fix the warnings they still are present in log.do_compile

Cc Oleksandr Kravchuk <[email protected]>
Cc Robert Yang <[email protected]>
---
 meta-oe/recipes-extended/rsyslog/librelp_1.4.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-extended/rsyslog/librelp_1.4.0.bb +2 -0
index 9e57dd520d..16c63a7523 100644
@@ -14,3 +14,5 @@ SRCREV = "e96443dda3c080fa991decec26bc4ac98d24b9a2"
 S = "${WORKDIR}/git"
 
 inherit autotools pkgconfig
+
+CPPFLAGS += "-Wno-error"
Signature · 1 line
2.22.0
#1 lore raw

Thanks, it works for me.

// Robert

Quoted 38 lines · Khem Raj

After autoconf-archive was upgraded to 2019.01.06 it started to add extra warning flags via WARN_CFLAGS along with -Werror which means that now compiler could be stricter and break the build if any of the new warnings are flagged

The difference is

old

WARN_CFLAGS='-fno-strict-aliasing -Wimplicit-function-declaration -Wold-style-definition -Wjump-misses-init -Werror -Wno-suggest-attribute=format -Wunused-parameter -Wmissing-field-initializers'

new

WARN_CFLAGS='-fno-strict-aliasing -Wimplicit-function-declaration -Wold-style-definition -Wjump-misses-init -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wswitch-enum -Wswitch-default -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wdouble-promotion -pedantic -Wunused-parameter -Wmissing-field-initializers -Werror -Wno-suggest-attribute=format -Wunused-parameter -Wmissing-field-initializers'

Hence we started seing build failure like https://errors.yoctoproject.org/Errors/Details/252684/

This fix just turns off warnings-as-errors so build can still go on, if we need to fix the warnings they still are present in log.do_compile

Cc Oleksandr Kravchuk <[email protected]>
Cc Robert Yang <[email protected]>
---
  meta-oe/recipes-extended/rsyslog/librelp_1.4.0.bb | 2 ++
  1 file changed, 2 insertions(+)
meta-oe/recipes-extended/rsyslog/librelp_1.4.0.bb +2 -0
index 9e57dd520d..16c63a7523 100644
@@ -14,3 +14,5 @@ SRCREV = "e96443dda3c080fa991decec26bc4ac98d24b9a2"
  S = "${WORKDIR}/git"
 
  inherit autotools pkgconfig
+
+CPPFLAGS += "-Wno-error"