summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2014-02-24 02:15:51 +0100
committerDirk Engling <erdgeist@erdgeist.org>2014-02-24 02:15:51 +0100
commit37c0e1eb76d2fce2122305a7b172a5bae9602758 (patch)
treef3160b6e8123e71b77b352de2af144206dfab85b /src
parenta9c32ef3e85a736180fd497f3e353e47f98a4457 (diff)
Silence -Wextra warnings
Diffstat (limited to 'src')
-rw-r--r--src/export/extract_version_1.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/export/extract_version_1.c b/src/export/extract_version_1.c
index 27489ec..8651735 100644
--- a/src/export/extract_version_1.c
+++ b/src/export/extract_version_1.c
@@ -124,13 +124,14 @@ void act_on_page( uint8_t *file, uint8_t *page, int page_nr )
124 uint16_t * recs = (uint16_t*)(page + 0xe); 124 uint16_t * recs = (uint16_t*)(page + 0xe);
125 125
126 /* printf( " Acting on page %04d with flag %d and %04d records.\n", page_nr, flag, num_records ); */ 126 /* printf( " Acting on page %04d with flag %d and %04d records.\n", page_nr, flag, num_records ); */
127 (void)page_nr; /* silence warning about unused variable */
127 128
128 if( !blob_len ) /* Handle blob, pages when they're referenced */ 129 if( !blob_len ) /* Handle blob, pages when they're referenced */
129 for( record = 0; record < num_records; ++record ) 130 for( record = 0; record < num_records; ++record )
130 act_on_record( file, flag, page + 0xe, recs[record] ); 131 act_on_record( file, flag, page + 0xe, recs[record] );
131} 132}
132 133
133void act_on_file( uint8_t *file, size_t len ) 134void act_on_file( uint8_t *file )
134{ 135{
135 int page, num_pages = *(uint16_t*)(file+0x40); 136 int page, num_pages = *(uint16_t*)(file+0x40);
136 int num_records = *(uint32_t*)(file+0x42); 137 int num_records = *(uint32_t*)(file+0x42);
@@ -151,7 +152,7 @@ void act_on_file( uint8_t *file, size_t len )
151 act_on_page( file, file + 0x800 + 0x2000 * page, page ); 152 act_on_page( file, file + 0x800 + 0x2000 * page, page );
152} 153}
153 154
154int main( int args, char **argv ) 155int main( )
155{ 156{
156 char filename[1024]; 157 char filename[1024];
157 MAP f; 158 MAP f;
@@ -167,7 +168,7 @@ int main( int args, char **argv )
167 filename[strlen(filename)-1] = 0; /* fgets sucks */ 168 filename[strlen(filename)-1] = 0; /* fgets sucks */
168 f = map_file( filename, 1 ); 169 f = map_file( filename, 1 );
169 170
170 act_on_file( f->addr, f->size ); 171 act_on_file( f->addr );
171 unmap_file( &f ); 172 unmap_file( &f );
172 } 173 }
173 174