Opened 19 years ago

Closed 19 years ago

Last modified 6 years ago

#2530 closed defect (fixed)

DC: selector.cpp compilation failed

Reported by: SF/erwan2004 Owned by: fingolfin
Priority: normal Component: Port: Dreamcast
Version: Keywords:
Cc: Game:

Description

Hi I do not compile the file scummvm/backends/dc/selector.cpp

The recent changes of the file base/gameDetector.h are the cause.

Host SUSUE 10 Toolchian SH-ELF :gcc-4.0.2_binutils-2.16.1_newlib-1.14.0

Error:

/home/erwan/Dreamcast/Toolchain/gcc-4.0.2_binutils-2.16.1_newlib-1.14.0/sh-elf/bin/sh-elf-g++ -ml -m4-single-only -Wp,-MMD,"./.deps/selector.d",-MQ,"selector.o",-MP -O3 -Wno-multichar -funroll-loops -fschedule-insns2 -fomit-frame-pointer -fdelete-null-pointer-checks -fno-exceptions -D__DC__ -DNONSTANDARD_PORT -DUSE_MAD -DDISABLE_SCALERS -I./ -I../.. -I../../common -I/home/erwan/Dreamcast/Toolchain/ronin-src/include/ -I../../engines -c selector.cpp -o selector.o selector.cpp: In function ‘int findGames(Game*, int)’: selector.cpp:234: erreur: cannot convert ‘const Common::String’ to ‘const char*’ for argument ‘2’ to ‘char* strcpy(char*, const char*)’ selector.cpp:239: erreur: cannot convert ‘const Common::String’ to ‘const char*’ for argument ‘2’ to ‘char* strcpy(char*, const char*)’ make: *** [selector.o] Erreur 1

function ‘int findGames(Game*, int):

static int findGames(Game *games, int max) { Dir *dirs = new Dir[MAX_DIR]; int curr_game = 0, curr_dir = 0, num_dirs = 1; dirs[0].node = FilesystemNode(); while(curr_game < max && curr_dir < num_dirs) { strncpy(dirs[curr_dir].name, dirs[curr_dir].node.path().c_str(), 252); dirs[curr_dir].name[251] = '\0'; dirs[curr_dir].deficon[0] = '\0'; FSList files, fslist = dirs[curr_dir++].node.listDir(FilesystemNode::kListAll); for (FSList::const_iterator entry = fslist.begin(); entry != fslist.end(); ++entry) { if (entry->isDirectory()) { if(num_dirs < MAX_DIR && strcasecmp(entry->displayName().c_str(), "install")) { dirs[num_dirs].node = *entry; num_dirs++; } } else if(isIcon(*entry)) strcpy(dirs[curr_dir-1].deficon, entry->displayName().c_str()); else files.push_back(*entry); }

DetectedGameList candidates; detectGames(files, candidates);

for(DetectedGameList::const_iterator ge = candidates.begin(); ge != candidates.end(); ++ge) if(curr_game < max) { strcpy(games[curr_game].filename_base, ge->gameid); strcpy(games[curr_game].dir, dirs[curr_dir-1].name); if(uniqueGame(games[curr_game].filename_base, games[curr_game].dir, games, curr_game)) {

strcpy(games[curr_game].text, ge->description); #if 0 printf("Registered game <%s> in <%s> <%s> because of <%s> <*>\n", games[curr_game].text, games[curr_game].dir, games[curr_game].filename_base, dirs[curr_dir-1].name); #endif curr_game++; } } }

for(int i=0; i<curr_game; i++) if(!loadIcon(games[i], dirs, num_dirs)) makeDefIcon(games[i].icon); delete[] dirs; return curr_game; }

Ticket imported from: #1449912. Ticket imported from: bugs/2530.

Change History (3)

comment:1 by fingolfin, 19 years ago

Should be fixed in SVN.

comment:2 by fingolfin, 19 years ago

Owner: set to fingolfin
Resolution: fixed
Status: newclosed

comment:3 by digitall, 6 years ago

Component: --Unset--Port: Dreamcast
Note: See TracTickets for help on using tickets.