Search
lxdream.org :: lxdream/src/tools/genmach.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/tools/genmach.c
changeset 1298:d0eb2307b847
prev1296:30ecee61f811
author nkeynes
date Wed Feb 04 08:38:23 2015 +1000 (5 years ago)
permissions -rw-r--r--
last change Fix assorted compile warnings reported by Clang
file annotate diff log raw
1.1 --- a/src/tools/genmach.c Sat Jan 26 14:00:48 2013 +1000
1.2 +++ b/src/tools/genmach.c Wed Feb 04 08:38:23 2015 +1000
1.3 @@ -72,7 +72,7 @@
1.4 if( q == NULL ) {
1.5 return g_strdup_printf("%s%s", p, ext);
1.6 } else {
1.7 - return g_strdup_printf("%.*s%s", q-p, p, ext );
1.8 + return g_strdup_printf("%.*s%s", (int)(q-p), p, ext );
1.9 }
1.10 }
1.11
1.12 @@ -136,9 +136,9 @@
1.13 }
1.14 }
1.15
1.16 -char *build_page_initializer( regblock_t block )
1.17 +unsigned char *build_page_initializer( regblock_t block )
1.18 {
1.19 - char *page = g_malloc(LXDREAM_PAGE_SIZE);
1.20 + unsigned char *page = g_malloc(LXDREAM_PAGE_SIZE);
1.21
1.22 /* First, background fill if any */
1.23 if( block->flags.fillSizeBytes == 0 ) {
1.24 @@ -240,7 +240,7 @@
1.25 fprintf( f, " mmio_region_%s_read_word, mmio_region_%s_write_word,\n", block->name, block->name );
1.26 fprintf( f, " mmio_region_%s_read_byte, mmio_region_%s_write_byte,\n", block->name, block->name );
1.27 fprintf( f, " mmio_region_%s_read_burst, mmio_region_%s_write_burst,\n", block->name, block->name );
1.28 - fprintf( f, " unmapped_prefetch, mmio_region_%s_read_byte },\n", block->name, block->name );
1.29 + fprintf( f, " unmapped_prefetch, mmio_region_%s_read_byte },\n", block->name );
1.30 fprintf( f, " NULL, NULL, {\n" );
1.31 for( unsigned i=0; i<block->numRegs; i++ ) {
1.32 regdef_t reg = block->regs[i];
1.33 @@ -362,7 +362,7 @@
1.34 }
1.35
1.36 for( GList *ptr = block_list; ptr != NULL; ptr = ptr->next ) {
1.37 - char *data = build_page_initializer((regblock_t)ptr->data);
1.38 + unsigned char *data = build_page_initializer((regblock_t)ptr->data);
1.39 fwrite_dump( data, LXDREAM_PAGE_SIZE, stdout );
1.40 g_free(data);
1.41 }
.