Print this page
8626 make pcplusmp and apix warning-free
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

@@ -18,10 +18,11 @@
  *
  * CDDL HEADER END
  */
 /*
  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2017 Joyent, Inc.
  */
 
 #ifndef __SYS_APIX_APIX_H
 #define __SYS_APIX_APIX_H
 

@@ -285,15 +286,16 @@
 #define APIX_IS_FAKE_INTR(_vector)\
         (apix_rebindinfo.i_go && (_vector) == APIX_RESV_VECTOR)
 
 #define APIX_DO_FAKE_INTR(_cpu, _vector)\
         if (APIX_IS_FAKE_INTR(_vector)) {\
-                struct autovec *tp;\
+                struct autovec *tp = NULL;\
                 if ((_cpu) == apix_rebindinfo.i_old_cpuid)\
                         tp = apix_rebindinfo.i_old_av;\
                 else if ((_cpu) == apix_rebindinfo.i_new_cpuid)\
                         tp = apix_rebindinfo.i_new_av;\
+                ASSERT(tp != NULL);\
                 if (tp->av_vector != NULL &&\
                     (tp->av_flags & AV_PENTRY_PEND) == 0) {\
                         tp->av_flags |= AV_PENTRY_PEND;\
                         apix_insert_pending_av(apixs[(_cpu)], tp,\
                             tp->av_prilevel);\