summaryrefslogtreecommitdiffstats
path: root/examples/api
diff options
context:
space:
mode:
Diffstat (limited to 'examples/api')
-rw-r--r--examples/api/demo.c2
-rw-r--r--examples/api/libgenwrap.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/examples/api/demo.c b/examples/api/demo.c
index df9c4bd8bc..65e7491847 100644
--- a/examples/api/demo.c
+++ b/examples/api/demo.c
@@ -41,7 +41,7 @@ void test_dump_sig(struct api_signature *);
static char buf[BUF_SZ];
-int main(int argc, char *argv[])
+int main(int argc, char * const argv[])
{
int rv = 0, h, i, j, devs_no;
struct api_signature *sig = NULL;
diff --git a/examples/api/libgenwrap.c b/examples/api/libgenwrap.c
index b435ddecba..9733bbc52e 100644
--- a/examples/api/libgenwrap.c
+++ b/examples/api/libgenwrap.c
@@ -37,7 +37,7 @@
/*
* printf() and vprintf() are stolen from u-boot/common/console.c
*/
-void printf (const char *fmt, ...)
+int printf (const char *fmt, ...)
{
va_list args;
uint i;
@@ -53,9 +53,10 @@ void printf (const char *fmt, ...)
/* Print the string */
ub_puts (printbuffer);
+ return i;
}
-void vprintf (const char *fmt, va_list args)
+int vprintf (const char *fmt, va_list args)
{
uint i;
char printbuffer[256];
@@ -67,6 +68,7 @@ void vprintf (const char *fmt, va_list args)
/* Print the string */
ub_puts (printbuffer);
+ return i;
}
void putc (const char c)