summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/eepro100_eeprom.c9
-rw-r--r--examples/nios2.lds1
-rw-r--r--examples/sched.c2
3 files changed, 8 insertions, 4 deletions
diff --git a/examples/eepro100_eeprom.c b/examples/eepro100_eeprom.c
index 60b937ef8..a52e68d4e 100644
--- a/examples/eepro100_eeprom.c
+++ b/examples/eepro100_eeprom.c
@@ -78,9 +78,12 @@ static inline short inw(long addr)
static inline void *memcpy(void *dst, const void *src, unsigned int len)
{
- void * ret = dst;
- while (len-- > 0) *((char *)dst)++ = *((char *)src)++;
- return ret;
+ char *ret = dst;
+ while (len-- > 0) {
+ *ret++ = *((char *)src);
+ src++;
+ }
+ return (void *)ret;
}
/* The EEPROM commands include the alway-set leading bit. */
diff --git a/examples/nios2.lds b/examples/nios2.lds
index 32fd4abe3..277a0a7a6 100644
--- a/examples/nios2.lds
+++ b/examples/nios2.lds
@@ -96,6 +96,7 @@ SECTIONS
/* CMD TABLE - uboot command sections
*/
+ . = .;
__uboot_cmd_start = .;
.u_boot_cmd :
{
diff --git a/examples/sched.c b/examples/sched.c
index 6b78f6998..ae01e0b05 100644
--- a/examples/sched.c
+++ b/examples/sched.c
@@ -292,7 +292,7 @@ static int thread_start (int id)
current_tid = id;
PDEBUG ("thread_start: to be stack=0%08x",
(unsigned)lthreads[id].stack);
- setctxsp (&lthreads[id].stack[STK_SIZE]);
+ setctxsp ((vu_char *)&lthreads[id].stack[STK_SIZE]);
thread_launcher ();
}