summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaosql <[email protected]>2024-06-05 15:35:17 +0800
committerRbb666 <[email protected]>2024-06-10 14:26:44 +0800
commit564121050c7959f35daf027ca1f5becbf0021d04 (patch)
tree9c98d459c69e68ee48f44e6d6c2d805ea1241fa1
parentfe950fd1c22c0418ab7d217705e6b376a61f6d92 (diff)
fix DeprecationWarning: invalid escape sequence.
-rw-r--r--tools/gcc.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/gcc.py b/tools/gcc.py
index dfcb98c617..ef9a5c8549 100644
--- a/tools/gcc.py
+++ b/tools/gcc.py
@@ -252,11 +252,11 @@ def GCCResult(rtconfig, str):
if re.search('union[ \t]+sigval', line):
have_sigval = 1
- if re.search('char\* version', line):
- version = re.search(r'\"([^"]+)\"', line).groups()[0]
+ if re.search(r'char\* version', line):
+ version = re.search(r'"([^"]+)"', line).groups()[0]
- if re.findall('iso_c_visible = [\d]+', line):
- stdc = re.findall('[\d]+', line)[0]
+ if re.findall(r'iso_c_visible = \d+', line):
+ stdc = re.findall(r'\d+', line)[0]
if re.findall('pthread_create', line):
posix_thread = 1