summaryrefslogtreecommitdiffstats
path: root/edify
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2012-04-12 20:01:22 +0200
committerDoug Zongker <dougz@android.com>2012-04-12 20:01:22 +0200
commite5d5ac76cc8e5d11867aeff6a1d068215c1c3a7c (patch)
treec88149f2f9c48966f66533e7bbf0b66ae407a314 /edify
parentrun minadbd as shell user, remove unused code (diff)
downloadandroid_bootable_recovery-e5d5ac76cc8e5d11867aeff6a1d068215c1c3a7c.tar
android_bootable_recovery-e5d5ac76cc8e5d11867aeff6a1d068215c1c3a7c.tar.gz
android_bootable_recovery-e5d5ac76cc8e5d11867aeff6a1d068215c1c3a7c.tar.bz2
android_bootable_recovery-e5d5ac76cc8e5d11867aeff6a1d068215c1c3a7c.tar.lz
android_bootable_recovery-e5d5ac76cc8e5d11867aeff6a1d068215c1c3a7c.tar.xz
android_bootable_recovery-e5d5ac76cc8e5d11867aeff6a1d068215c1c3a7c.tar.zst
android_bootable_recovery-e5d5ac76cc8e5d11867aeff6a1d068215c1c3a7c.zip
Diffstat (limited to '')
-rw-r--r--edify/expr.c2
-rw-r--r--edify/expr.h10
2 files changed, 10 insertions, 2 deletions
diff --git a/edify/expr.c b/edify/expr.c
index 360007586..07a8ceb6a 100644
--- a/edify/expr.c
+++ b/edify/expr.c
@@ -495,7 +495,7 @@ Value** ReadValueVarArgs(State* state, int argc, Expr* argv[]) {
// Use printf-style arguments to compose an error message to put into
// *state. Returns NULL.
-Value* ErrorAbort(State* state, char* format, ...) {
+Value* ErrorAbort(State* state, const char* format, ...) {
char* buffer = malloc(4096);
va_list v;
va_start(v, format);
diff --git a/edify/expr.h b/edify/expr.h
index 8e1c63872..0d8ed8f57 100644
--- a/edify/expr.h
+++ b/edify/expr.h
@@ -21,6 +21,10 @@
#include "yydefs.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define MAX_STRING_LEN 1024
typedef struct Expr Expr;
@@ -152,7 +156,7 @@ Value** ReadValueVarArgs(State* state, int argc, Expr* argv[]);
// Use printf-style arguments to compose an error message to put into
// *state. Returns NULL.
-Value* ErrorAbort(State* state, char* format, ...);
+Value* ErrorAbort(State* state, const char* format, ...) __attribute__((format(printf, 2, 3)));
// Wrap a string into a Value, taking ownership of the string.
Value* StringValue(char* str);
@@ -160,4 +164,8 @@ Value* StringValue(char* str);
// Free a Value object.
void FreeValue(Value* v);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // _EXPRESSION_H