From 137a30ad75803255615a422c15ebcd35fbd31130 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 16 Aug 2018 00:27:01 -0700 Subject: [PATCH] fix mpy-cross --- py/makeqstrdata.py | 6 +++++- supervisor/shared/translate.c | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/py/makeqstrdata.py b/py/makeqstrdata.py index ea8629ef3e..b0a043ee3d 100644 --- a/py/makeqstrdata.py +++ b/py/makeqstrdata.py @@ -11,8 +11,12 @@ import sys import collections import gettext +import os.path -sys.path.append("../../tools/huffman") +py = os.path.dirname(sys.argv[0]) +top = os.path.dirname(py) + +sys.path.append(os.path.join(top, "tools/huffman")) import huffman diff --git a/supervisor/shared/translate.c b/supervisor/shared/translate.c index 1f338befc9..487ae19970 100644 --- a/supervisor/shared/translate.c +++ b/supervisor/shared/translate.c @@ -71,8 +71,6 @@ char* decompress(const compressed_string_t* compressed, char* decompressed) { return decompressed; } -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wreturn-local-addr" inline __attribute__((always_inline)) const compressed_string_t* translate(const char* original) { #ifndef NO_QSTR #define QDEF(id, str) @@ -83,4 +81,3 @@ inline __attribute__((always_inline)) const compressed_string_t* translate(const #endif return NULL; } -#pragma GCC diagnostic pop