Skip to content

Commit 503979b

Browse files
committed
Fix some warnings
1 parent baebfc1 commit 503979b

4 files changed

Lines changed: 20 additions & 22 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ endif()
1515

1616
if(TYPEART_IS_TOP_LEVEL)
1717
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
18-
set(CMAKE_VERBOSE_MAKEFILE ON)
18+
# set(CMAKE_VERBOSE_MAKEFILE ON)
1919
endif()
2020

2121
set(CMAKE_CXX_STANDARD 17)

lib/mpi_interceptor/wrap.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,21 @@
8585

8686
# Regular expressions for start and end of declarations in mpi.h. These are
8787
# used to get the declaration strings out for parsing with formal_re below.
88-
begin_decl_re = re.compile("(" + "|".join(rtypes) + ")\s+(MPI_\w+)\s*\(")
88+
begin_decl_re = re.compile(r"(" + "|".join(rtypes) + r")\s+(MPI_\w+)\s*\(")
8989
exclude_re = re.compile("|".join(exclude_strings))
90-
end_decl_re = re.compile("\).*\;")
90+
end_decl_re = re.compile(r"\).*\;")
9191

9292
# Regular Expression for splitting up args. Matching against this
9393
# returns three groups: type info, arg name, and array info
9494
formal_re = re.compile(
95-
"\s*(" + # Start type
96-
"(?:const)?\s*" + # Initial const
97-
"\w+" # Type name (note: doesn't handle 'long long', etc. right now)
98-
")\s*(" + # End type, begin pointers
99-
"(?:\s*\*(?:\s*const)?)*" + # Look for 0 or more pointers with optional 'const'
100-
")\s*" # End pointers
101-
"(?:(\w+)\s*)?" + # Argument name. Optional.
102-
"(\[.*\])?\s*$" # Array type. Also optional. Works for multidimensions b/c it's greedy.
95+
r"\s*(" + # Start type
96+
r"(?:const)?\s*" + # Initial const
97+
r"\w+" # Type name (note: doesn't handle 'long long', etc. right now)
98+
r")\s*(" + # End type, begin pointers
99+
r"(?:\s*\*(?:\s*const)?)*" + # Look for 0 or more pointers with optional 'const'
100+
r")\s*" # End pointers
101+
r"(?:(\w+)\s*)?" + # Argument name. Optional.
102+
r"(\[.*\])?\s*$" # Array type. Also optional. Works for multidimensions b/c it's greedy.
103103
)
104104

105105
# Fortran wrapper suffix
@@ -724,12 +724,12 @@ def cFormal(self):
724724
def castType(self):
725725
arr = self.array or ''
726726
pointers = self.pointers or ''
727-
if re.search('\[\s*\]', arr):
727+
if re.search(r'\[\s*\]', arr):
728728
if arr.count('[') > 1:
729729
pointers += '(*)' # need extra parens for, e.g., int[][3] -> int(*)[3]
730730
else:
731731
pointers += '*' # justa single array; can pass pointer.
732-
arr = re.sub('\[\s*\]', '', arr)
732+
arr = re.sub(r'\[\s*\]', '', arr)
733733
return "%s%s%s" % (self.type, pointers, arr)
734734

735735
def __str__(self):

lib/runtime/Runtime.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,10 @@ RuntimeSystem::RuntimeSystem()
9090
}
9191
} else {
9292
if (!loadTypes(defaultTypeFileName, error)) {
93-
LOG_WARNING(
94-
"No type file with default name \""
95-
<< defaultTypeFileName
96-
<< "\" in current directory. Using default built-in types only. To specify a different file, edit the "
97-
"TYPEART_TYPE_FILE environment variable. Reason: "
98-
<< error.message());
93+
LOG_DEBUG("No type file with default name \""
94+
<< defaultTypeFileName
95+
<< "\" in current directory. Using default built-in types only. To specify a different file, edit the "
96+
<< config::EnvironmentStdArgs::types << " environment variable. Reason: " << error.message());
9997
}
10098
}
10199

@@ -105,7 +103,7 @@ RuntimeSystem::RuntimeSystem()
105103
ss << structInfo.name << ", ";
106104
}
107105
recorder.incUDefTypes(typeList.size());
108-
LOG_INFO("Recorded types: " << ss.str());
106+
LOG_DEBUG("Recorded types: " << ss.str());
109107
rtScopeInit.reset();
110108
}
111109

lib/runtime/RuntimeData.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
#endif
5252

5353
#if defined(__has_feature)
54-
#if __has_feature(address_sanitizer)
55-
#define __SANITIZE_ADDRESS__
54+
#if __has_feature(address_sanitizer) && !defined(__SANITIZE_ADDRESS__)
55+
#define __SANITIZE_ADDRESS__ 1
5656
#endif
5757
#endif
5858

0 commit comments

Comments
 (0)