diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index cc2740d94..d996801ba 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -3982,7 +3982,7 @@ printf("\n"); find_new_part(npart, dpart); tt = time(0); printf("\n********* new file %s expected size %lld, start time %s", dpart, newsize, ctime (&tt)); - dstfd = open (dpart, O_CREAT|O_WRONLY|O_TRUNC| O_LARGEFILE); + dstfd = open (dpart, O_CREAT|O_WRONLY|O_TRUNC| O_LARGEFILE, 0644); if(dstfd < 0) { perror(dpart); return 0; @@ -4217,7 +4217,7 @@ printf("\ncopy: processing bookmark %d at %lld len %lld\n", i, books[i].pos, boo } if(!dst_done || !onefile) { find_new_part(npart, dpart); - dstfd = open (dpart, O_CREAT|O_WRONLY|O_TRUNC| O_LARGEFILE); + dstfd = open (dpart, O_CREAT|O_WRONLY|O_TRUNC| O_LARGEFILE, 0644); printf("copy: new file %s fd %d\n", dpart, dstfd); if(dstfd < 0) { printf("failed to open %s\n", dpart); diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 113b96fb8..648aa67d1 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1126,7 +1126,7 @@ void CMoviePlayerGui::PlayFile(void) } else { char temp_name[255]; - char *slash = strrchr(filename, '/'); + const char *slash = strrchr(filename, '/'); if (slash) { slash++; int len = strlen(slash); diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 9db9d8ec1..f053612c1 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -238,10 +238,10 @@ printf("[update] filename %s type %c newVersion %s md5 %s\n", filename.c_str(), bool CFlashUpdate::getUpdateImage(const std::string & version) { CHTTPTool httpTool; - char * fname, dest_name[100]; + char dest_name[100]; httpTool.setStatusViewer(this); - fname = rindex(filename.c_str(), '/'); + const char *fname = rindex(filename.c_str(), '/'); if(fname != NULL) fname++; else return false; @@ -335,7 +335,7 @@ printf("[update] mode is %d\n", g_settings.softupdate_mode); return false; } hide(); - char * ptr = rindex(filename.c_str(), '.'); + const char *ptr = rindex(filename.c_str(), '.'); if(ptr) { ptr++; if(!strcmp(ptr, "bin")) fileType = 'A'; @@ -381,7 +381,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &) if(g_settings.softupdate_mode==1) //internet-update { - char * fname = rindex(filename.c_str(), '/') +1; + const char * fname = rindex(filename.c_str(), '/') +1; char fullname[255]; if(!getUpdateImage(newVersion)) {