Skip to content

Commit

Permalink
kbuild: Remove -Waggregate-return from scripts/Makefile.extrawarn
Browse files Browse the repository at this point in the history
It makes little sense to pass -Waggregate-return these days since large
part of the linux kernel rely on returning struct(s). For instance:

  ../include/linux/timekeeping.h: In function 'show_uptime':
  ../include/linux/ktime.h:91:34: error: function call has aggregate value [-Werror=aggregate-return]
   #define ktime_to_timespec64(kt)  ns_to_timespec64((kt))
                                    ^~~~~~~~~~~~~~~~~~~~~~
  ../include/linux/timekeeping.h:166:8: note: in expansion of macro 'ktime_to_timespec64'
    *ts = ktime_to_timespec64(ktime_get_coarse_boottime());

Remove this warning from W=2 completely.

Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
  • Loading branch information
malaterre authored and masahir0y committed Jun 9, 2019
1 parent d1fdb6d commit 869ee58
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion scripts/Makefile.extrawarn
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ warning-1 += $(call cc-option, -Wstringop-truncation)
warning-1 += -Wno-missing-field-initializers
warning-1 += -Wno-sign-compare

warning-2 := -Waggregate-return
warning-2 += -Wcast-align
warning-2 += -Wdisabled-optimization
warning-2 += -Wnested-externs
Expand Down

0 comments on commit 869ee58

Please sign in to comment.