Previous 15994 Revisions Next

r7832 Friday 16th April, 2010 at 14:23:39 UTC by Firewave
Disabled unused variables reported by cppcheck
[src/mess/devices]aescart.c ti99cart.c
[src/mess/formats]cocopak.c
[src/mess/machine]wswan.c
[src/mess/osd/winui]softwarepicker.c
[src/mess/tools/imgtool/modules]fat.c os9.c
[src/mess/tools/imgtool/windows]wimgtool.c
[src/mess/tools/messtest]core.c
[src/mess/video]kc.c odyssey2.c vic4567.c x68k.c
[src/osd/winui]picker.c treeview.c winui.c

src/osd/winui/picker.c
r7831r7832
927927void Picker_Sort(HWND hwndPicker)
928928{
929929   LV_FINDINFO lvfi;
930   struct PickerInfo *pPickerInfo;
930   //struct PickerInfo *pPickerInfo;
931931   struct CompareProcParams params;
932932   int nItem;
933933   BOOL res;
934934
935   pPickerInfo = GetPickerInfo(hwndPicker);
935   //pPickerInfo = GetPickerInfo(hwndPicker);
936936
937937   // populate the CompareProcParams structure
938938   Picker_PopulateCompareProcParams(hwndPicker, &params);
r7831r7832
953953
954954int Picker_InsertItemSorted(HWND hwndPicker, int nParam)
955955{
956   struct PickerInfo *pPickerInfo;
956   //struct PickerInfo *pPickerInfo;
957957   int nHigh, nLow, nMid;
958958   struct CompareProcParams params;
959959   int nCompareResult;
960960   LVITEM lvi;
961961   BOOL res;
962962
963   pPickerInfo = GetPickerInfo(hwndPicker);
963   //pPickerInfo = GetPickerInfo(hwndPicker);
964964
965965   nLow = 0;
966966   nHigh = ListView_GetItemCount(hwndPicker);
src/osd/winui/treeview.c
r7831r7832
11631163   int nGames = driver_list_get_count(drivers);
11641164   LPTREEFOLDER lpFolder = treeFolders[parent_index];
11651165   const rom_entry *region, *rom;
1166   const char *name;
1166   //const char *name;
11671167   const game_driver *gamedrv;
11681168   machine_config *config;
11691169
r7831r7832
12161216            {
12171217               if (ROMREGION_ISROMDATA(region) || ROMREGION_ISDISKDATA(region) )
12181218               {
1219                  name = ROM_GETNAME(rom);
1219                  //name = ROM_GETNAME(rom);
12201220                  if (hash_data_has_info(ROM_GETHASHDATA(rom), HASH_INFO_BAD_DUMP))           
12211221                     bBadDump = TRUE;
12221222                  if (hash_data_has_info(ROM_GETHASHDATA(rom), HASH_INFO_NO_DUMP))           
src/osd/winui/winui.c
r7831r7832
63006300   int          nGame = Picker_GetSelectedItem(hwndList);
63016301   LPTREEFOLDER lpFolder = GetCurrentFolder();
63026302   int i;
6303   const char *pParent;
6303   //const char *pParent;
63046304   TCHAR* t_description;
63056305
63066306   if (have_selection)
r7831r7832
63486348       EnableMenuItem(hMenu,ID_CONTEXT_REMOVE_CUSTOM,MF_GRAYED);
63496349      EnableMenuItem(hMenu,ID_CONTEXT_RENAME_CUSTOM,MF_GRAYED);
63506350   }
6351   pParent = GetFolderNameByID(lpFolder->m_nParent+1);
6351   //pParent = GetFolderNameByID(lpFolder->m_nParent+1);
63526352
63536353   if (lpFolder->m_dwFlags & F_INIEDIT)
63546354      EnableMenuItem(hMenu,ID_FOLDER_PROPERTIES,MF_ENABLED);
src/mess/devices/ti99cart.c
r7831r7832
623623*/
624624static int assemble_std(running_device *image)
625625{
626   cartridge_t *cart;
626//   cartridge_t *cart;
627627//  printf("assemble_std, %s\n", image->tag);
628   cart = assemble_common(image);
628   /*cart = */assemble_common(image);
629629
630630   return INIT_PASS;
631631}
r7831r7832
12951295
12961296static int assemble_mbx(running_device *image)
12971297{
1298   cartridge_t *cart;
1298//   cartridge_t *cart;
12991299
13001300//  printf("assemble_mbx, %s\n", image->tag);
1301   cart = assemble_common(image);
1301   /*cart = */assemble_common(image);
13021302   return INIT_PASS;
13031303}
13041304
src/mess/devices/aescart.c
r7831r7832
258258*/
259259static int assemble_std(running_machine *machine, running_device *image)
260260{
261   aescartridge_t *cart;
261//   aescartridge_t *cart;
262262//  printf("assemble_std, %s\n", image->tag);
263   cart = assemble_common(machine, image);
263   /*cart = */assemble_common(machine, image);
264264
265265   return INIT_PASS;
266266}
r7831r7832
274274*/
275275static int disassemble_std(running_device *image)
276276{
277   int slotnumber;
277//   int slotnumber;
278278//  int i;
279   aescartridge_t *cart;
280   running_device *cartsys = image->owner;
281   aes_multicart_t *cartslots = (aes_multicart_t *)cartsys->token;
279//   aescartridge_t *cart;
280//   running_device *cartsys = image->owner;
281//   aes_multicart_t *cartslots = (aes_multicart_t *)cartsys->token;
282282
283   slotnumber = get_index_from_tagname(image)-1;
283//   slotnumber = get_index_from_tagname(image)-1;
284284//  printf("Disassemble cartridge %d\n", slotnumber);
285285#if 0
286286   /* Search the highest remaining cartridge. */
r7831r7832
299299   }
300300#endif
301301   /* Do we have RAM? If so, swap the bytes (undo the BIG_ENDIANIZE) */
302   cart = &cartslots->cartridge[slotnumber];
302//   cart = &cartslots->cartridge[slotnumber];
303303
304304//  clear_slot(cartsys, slotnumber);
305305
src/mess/tools/messtest/core.c
r7831r7832
495495
496496int messtest(const struct messtest_options *opts, int *test_count, int *failure_count)
497497{
498   char saved_directory[1024];
498   //char saved_directory[1024];
499499   file_error filerr;
500500   core_file *file;
501501   int result = -1;
r7831r7832
517517   }
518518
519519   /* save the current working directory, and change to the test directory */
520   saved_directory[0] = '\0';
520   //saved_directory[0] = '\0';
521521/*  if (!opts->preserve_directory)
522522    {
523523        script_directory = osd_dirname(opts->script_filename);
src/mess/tools/imgtool/windows/wimgtool.c
r7831r7832
11901190   object_pool *pool;
11911191   win_open_file_name ofn;
11921192   const imgtool_module *module;
1193   wimgtool_info *info;
1193   //wimgtool_info *info;
11941194   int read_or_write;
11951195
11961196   pool = pool_alloc_lib(NULL);
r7831r7832
12001200      goto done;
12011201   }
12021202
1203   info = get_wimgtool_info(window);
1203   //info = get_wimgtool_info(window);
12041204
12051205   err = setup_openfilename_struct(&ofn, pool, window, FALSE);
12061206   if (err)
r7831r7832
12411241   wimgtool_info *info;
12421242   option_resolution *opts = NULL;
12431243   BOOL cancel;
1244   const imgtool_module *module;
1244   //const imgtool_module *module;
12451245   const char *fork = NULL;
12461246   struct transfer_suggestion_info suggestion_info;
12471247   int use_suggestion_info;
r7831r7832
12701270      goto done;
12711271   }
12721272
1273   module = imgtool_image_module(info->image);
1273   //module = imgtool_image_module(info->image);
12741274
12751275   /* figure out which filters are appropriate for this file */
12761276   imgtool_partition_suggest_file_filters(info->partition, NULL, stream, suggestion_info.suggestions,
src/mess/tools/imgtool/modules/os9.c
r7831r7832
10981098{
10991099   imgtoolerr_t err;
11001100   imgtool_image *image = imgtool_partition_image(partition);
1101   const os9_diskinfo *disk_info;
1101   //const os9_diskinfo *disk_info;
11021102   struct os9_fileinfo file_info;
11031103   UINT32 dirent_lsn, dirent_index;
11041104   UINT32 entry_lsn, entry_index;
11051105   UINT32 i, j, lsn;
11061106   UINT8 b;
11071107
1108   disk_info = os9_get_diskinfo(image);
1108   //disk_info = os9_get_diskinfo(image);
11091109
11101110   err = os9_lookup_path(image, path, CREATE_NONE, &file_info, NULL, &dirent_lsn, &dirent_index);
11111111   if (err)
src/mess/tools/imgtool/modules/fat.c
r7831r7832
289289static imgtoolerr_t fat_read_sector(imgtool_partition *partition, UINT32 sector_index,
290290   int offset, void *buffer, size_t buffer_len)
291291{
292   const fat_partition_info *disk_info;
292   //const fat_partition_info *disk_info;
293293   imgtoolerr_t err;
294294   UINT8 data[FAT_SECLEN];
295295   UINT32 block_size;
296296   size_t len;
297297
298   disk_info = fat_get_partition_info(partition);
298   //disk_info = fat_get_partition_info(partition);
299299
300300   /* sanity check */
301301   err = imgtool_partition_get_block_size(partition, &block_size);
r7831r7832
324324static imgtoolerr_t fat_write_sector(imgtool_partition *partition, UINT32 sector_index,
325325   int offset, const void *buffer, size_t buffer_len)
326326{
327   const fat_partition_info *disk_info;
327   //const fat_partition_info *disk_info;
328328   imgtoolerr_t err;
329329   UINT8 data[FAT_SECLEN];
330330   const void *write_data;
331331   UINT32 block_size;
332332   size_t len;
333333
334   disk_info = fat_get_partition_info(partition);
334   //disk_info = fat_get_partition_info(partition);
335335
336336   /* sanity check */
337337   err = imgtool_partition_get_block_size(partition, &block_size);
r7831r7832
461461   UINT32 boot_sector_offset;
462462   UINT64 total_clusters;
463463   UINT8 media_descriptor;
464   const char *title;
464   //const char *title;
465465   const char *fat_bits_string;
466466   UINT8 header[FAT_SECLEN];
467467   UINT64 first_fat_entries;
r7831r7832
506506   media_descriptor = known_media[i].media_descriptor;
507507
508508   /* other miscellaneous settings */
509   title = "";
509   //title = "";
510510   fat_count = 2;
511511   root_dir_count = 512;
512512   hidden_sectors = 0;
r7831r7832
12791279   fat_dirent *ent, fat_freeentry_info *freeent)
12801280{
12811281   imgtoolerr_t err;
1282   const fat_partition_info *disk_info;
1282   //const fat_partition_info *disk_info;
12831283   UINT8 entry[FAT_DIRENT_SIZE];
12841284   size_t bytes_read;
12851285   int i, j;
r7831r7832
12931293   assert(file->directory);
12941294   lfn_buf[0] = '\0';
12951295   memset(ent, 0, sizeof(*ent));
1296   disk_info = fat_get_partition_info(partition);
1296   //disk_info = fat_get_partition_info(partition);
12971297
12981298   /* The first eight bytes of a FAT directory entry is a blank padded name
12991299     *
src/mess/video/x68k.c
r7831r7832
11311131   int x;
11321132   tilemap_t* x68k_bg0;
11331133   tilemap_t* x68k_bg1;
1134   UINT8 *rom;
1134   //UINT8 *rom;
11351135
11361136   if((x68k_spritereg[0x408] & 0x03) == 0x00)  // Sprite/BG H-Res 0=8x8, 1=16x16, 2 or 3 = undefined.
11371137   {
r7831r7832
11631163      rect.max_y = cliprect->max_y;
11641164
11651165   // update tiles
1166   rom = memory_region(screen->machine, "user1");
1166   //rom = memory_region(screen->machine, "user1");
11671167   for(x=0;x<256;x++)
11681168   {
11691169      if(x68k_sys.video.tile16_dirty[x] != 0)
src/mess/video/vic4567.c
r7831r7832
564564{
565565   vic3_state *vic3 = get_safe_token(device);
566566   int y, i, prior, addr, xbegin, collision;
567   int value, value2, value3 = 0, bg, color[2];
567   int value, value2, value3 = 0, bg/*, color[2]*/;
568568
569569   xbegin = SPRITE_X_POS(nr);
570570   addr = vic3->dma_read(device->machine, SPRITE_ADDR(nr)) << 6;
571571   vic3->spritemulti[2] = SPRITE_COLOR(nr);
572572   prior = SPRITE_PRIORITY(nr);
573573   collision = SPRITE_BG_COLLISION(nr);
574   color[0] = 0;
575   color[1] = 1;
574   //color[0] = 0;
575   //color[1] = 1;
576576
577577   if (SPRITE_X_EXPAND(nr))
578578   {
src/mess/video/odyssey2.c
r7831r7832
310310   if ( vpos < start_vblank )
311311   {
312312      rectangle rect;
313      int   sprite_width[4] = { 8, 8, 8, 8 };
313      //int   sprite_width[4] = { 8, 8, 8, 8 };
314314      int i;
315315
316316      control_status &= ~ 0x01;
r7831r7832
486486            if ( o2_vdc.s.sprites[i].color & 4 )
487487            {
488488               /* Zoomed sprite */
489               sprite_width[i] = 16;
489               //sprite_width[i] = 16;
490490               if ( y <= ( vpos - start_vpos ) && ( vpos - start_vpos ) < y + height * 4 )
491491               {
492492                  UINT16 color = 16 + ( ( o2_vdc.s.sprites[i].color >> 3 ) & 0x07 );
src/mess/video/kc.c
r7831r7832
561561#ifdef UNUSED_FUNCTION
562562static void kc85_common_vh_eof_callback(void)
563563{
564      EVENT_LIST_ITEM *pItem;
564      //EVENT_LIST_ITEM *pItem;
565565      int NumItems;
566566
567567      /* Empty event buffer */
r7831r7832
570570      /* to do: the entries in this buffer are ignored. OK? */
571571      if (NumItems)
572572      {
573         pItem = EventList_GetFirstItem();
573         //pItem = EventList_GetFirstItem();
574574         EventList_Reset();
575575         EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu, attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
576576         logerror ("Event log reset in callback fn.\n");
src/mess/osd/winui/softwarepicker.c
r7831r7832
605605static BOOL SoftwarePicker_AddEntry(HWND hwndPicker,
606606   directory_search_info *pSearchInfo)
607607{
608   software_picker_info *pPickerInfo;
608   //software_picker_info *pPickerInfo;
609609   LPSTR pszFilename;
610610   BOOL rc;
611611   char* utf8_FileName;
612612
613   pPickerInfo = GetSoftwarePickerInfo(hwndPicker);
613   //pPickerInfo = GetSoftwarePickerInfo(hwndPicker);
614614
615615   utf8_FileName = utf8_from_tstring(pSearchInfo->fd.cFileName);
616616   if( !utf8_FileName )
src/mess/machine/wswan.c
r7831r7832
13761376DEVICE_IMAGE_LOAD(wswan_cart)
13771377{
13781378   UINT32 ii;
1379#ifdef MAME_DEBUG
13791380   const char *sram_str;
1381#endif
13801382
13811383   ws_ram = (UINT8*) memory_get_read_ptr( cputag_get_address_space( image->machine, "maincpu", ADDRESS_SPACE_PROGRAM ), 0 );
13821384   memset( ws_ram, 0, 0xFFFF );
r7831r7832
13991401      }
14001402   }
14011403
1404#ifdef MAME_DEBUG
14021405   sram_str = wswan_determine_sram( ROMMap[ROMBanks-1][0xfffb] );
1406#endif
14031407
14041408   rtc.present = ROMMap[ROMBanks-1][0xfffd] ? 1 : 0;
14051409
src/mess/formats/cocopak.c
r7831r7832
270270   pak_trailer9 p9;
271271   pak_trailer11 p11;
272272   pcd_info1 *pcd1 = NULL;
273   pcd_info2 *pcd2 = NULL;
273   //pcd_info2 *pcd2 = NULL;
274274
275275   union {
276276      pak_trailer8 p8;
r7831r7832
349349      if ((pcd1->magic1[0] == 0xAB) && (pcd1->magic1[1] == 0xBA)) {
350350         /* Yes it is! */
351351         /* Note! I should be checking the checksum */
352         pcd2 = (pcd_info2 *) p11.disk_name;
352         //pcd2 = (pcd_info2 *) p11.disk_name;
353353      }
354354      else {
355355         /* No it is not */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team