tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

INTRSTACKSIZE in intr.c



There are some inline functions in sys/arch/x86/x86/intr.c that are only
called if INTRSTACKSIZE is defined but the functions are declared static
in any case which causes compile errors if -Werror is on which happens
if developer is true in mk.conf.

I don't normally work in the kernel so even though it seems like a
no-brainer I thought I should ask before committing the patch at the end
of this message.  Also, should I continue to ask for things this simple
or just go ahead in the future?

I also tripped over this but I am not sure how to fix this one.  I
assume that it is a clang issue.

/usr/src/external/cddl/osnet/dist/uts/common/sys/list_impl.h:30:9: error:
      unknown pragma ignored [-Werror,-Wunknown-pragmas]
#pragma ident   "%Z%%M% %I%     %E% SMI"


Index: sys/arch/x86/x86/intr.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/intr.c,v
retrieving revision 1.119
diff -u -u -r1.119 intr.c
--- sys/arch/x86/x86/intr.c     13 Jan 2018 20:36:06 -0000      1.119
+++ sys/arch/x86/x86/intr.c     19 Jan 2018 12:22:03 -0000
@@ -245,8 +245,10 @@
 #endif /* XXX: XEN */
 #endif

+#if defined(INTRSTACKSIZE)
 static inline bool redzone_const_or_false(bool);
 static inline int redzone_const_or_zero(int);
+#endif

 static void intr_redistribute_xc_t(void *, void *);
 static void intr_redistribute_xc_s1(void *, void *);
@@ -1428,6 +1430,7 @@
 static const char *x86_ipi_names[X86_NIPI] = X86_IPI_NAMES;
 #endif

+#if defined(INTRSTACKSIZE)
 static inline bool
 redzone_const_or_false(bool x)
 {
@@ -1443,6 +1446,7 @@
 {
        return redzone_const_or_false(true) ? x : 0;
 }
+#endif

 /*
  * Initialize all handlers that aren't dynamically allocated, and exist

-- 
D'Arcy J.M. Cain <darcy%NetBSD.org@localhost>
http://www.NetBSD.org/ IM:darcy%Vex.Net@localhost


Home | Main Index | Thread Index | Old Index