aboutsummaryrefslogtreecommitdiff
path: root/src/zjs_common.h
diff options
context:
space:
mode:
authorGeoff Gustafson <geoff@linux.intel.com>2016-09-07 16:03:44 -0700
committerGeoff Gustafson <geoff@linux.intel.com>2016-09-07 16:07:29 -0700
commit85e0ce74a57dfa6b70a4e20d933a64df6885e490 (patch)
tree48284619a359208350b4830144097a06d9e74d1a /src/zjs_common.h
parent8d310f98401252353a2169d7499aa5b4acd090e2 (diff)
[General] Restore MAX_SCRIPT_SIZE limit and add error checking for it
Checks for runtime and compile-time oversize scripts depending on which method is used. Also, fix const issue on script variable in main(). Also, enable all warnings and make warnings errors in src/Makefile.base Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
Diffstat (limited to 'src/zjs_common.h')
-rw-r--r--src/zjs_common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/zjs_common.h b/src/zjs_common.h
index 352937a..c0a46f8 100644
--- a/src/zjs_common.h
+++ b/src/zjs_common.h
@@ -20,6 +20,9 @@
// TODO: We should instead have a macro that changes in debug vs. release build,
// to save string space and instead print error codes or something for release.
+// this is arbitrary but okay for now; added to avoid plain strlen below
+#define MAX_SCRIPT_SIZE 4096
+
#if defined(CONFIG_BOARD_ARDUINO_101) || defined(CONFIG_BOARD_ARDUINO_101_SSS)
#define ARC_AIO_MIN 9
#define ARC_AIO_MAX 14