Dhairya Malhotra 7 年之前
父節點
當前提交
89e65ee539
共有 4 個文件被更改,包括 6 次插入5 次删除
  1. 1 1
      include/sctl/common.hpp
  2. 1 1
      include/sctl/legendre_rule.hpp
  3. 2 1
      include/sctl/mem_mgr.txx
  4. 2 2
      include/sctl/stacktrace.h

+ 1 - 1
include/sctl/common.hpp

@@ -39,7 +39,7 @@ typedef int64_t Long;  // problem size
     }                                                                                                           \
   } while (0)
 
-#define UNUSED(x) (void)(x)  // to ignore unused variable warning.
+#define SCTL_UNUSED(x) (void)(x)  // to ignore unused variable warning.
 
 namespace SCTL_NAMESPACE {
 #ifdef SCTL_MEMDEBUG

+ 1 - 1
include/sctl/legendre_rule.hpp

@@ -1229,7 +1229,7 @@ void scqf ( int nt, double t[], int mlt[], double wts[], int nwts, int ndx[],
 //    Input, double A, B, the interval endpoints.
 //
 {
-  (void)(nwts); //UNUSED(nwts);
+  (void)(nwts); //SCTL_UNUSED(nwts);
   double al=0;
   double be=0;
   int i;

+ 2 - 1
include/sctl/mem_mgr.txx

@@ -276,6 +276,7 @@ inline void MemoryManager::free(Iterator<char> p) const {
   if (p == nullptr) return;
   static uintptr_t alignment = SCTL_MEM_ALIGN - 1;
   static uintptr_t header_size = (uintptr_t)(sizeof(MemHead) + alignment) & ~(uintptr_t)alignment;
+  SCTL_UNUSED(header_size);
 
   MemHead& mem_head = GetMemHead(&p[0]);
   Long n_indx = mem_head.n_indx;
@@ -478,7 +479,7 @@ template <class ValueType> inline Iterator<ValueType> aligned_new(Long n_elem, c
     for (Long i = 0; i < n_elem; i++) {
       ValueType* Ai = new (&A[i]) ValueType();
       assert(Ai == (&A[i]));
-      UNUSED(Ai);
+      SCTL_UNUSED(Ai);
     }
   } else {
 #ifdef SCTL_MEMDEBUG

+ 2 - 2
include/sctl/stacktrace.h

@@ -69,8 +69,8 @@ inline void print_stacktrace(FILE* out = stderr, int skip = 1) {
 
 inline void abortHandler(int signum, siginfo_t* si, void* unused) {
   static bool first_time = true;
-  UNUSED(unused);
-  UNUSED(si);
+  SCTL_UNUSED(unused);
+  SCTL_UNUSED(si);
 
 #pragma omp critical(STACK_TRACE)
   if (first_time) {