Fix warning: 'open' has superfluous mode bits; missing O_CREAT?

Adding mode flags doesn't make sense if you don't create a file
but only open if for reading.

Change-Id: I9307b07cbbcddea565fff9258de7f7beb373a8ad
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
bb10
Alessandro Portale 2020-08-26 19:34:25 +02:00 committed by Lars Knoll
parent cb1004f94a
commit 23189a9068
1 changed files with 1 additions and 1 deletions

View File

@ -1173,7 +1173,7 @@ bool QDynamicFileResourceRoot::registerSelf(const QString &f)
qsizetype data_len = 0;
#if defined(QT_USE_MMAP)
int fd = QT_OPEN(QFile::encodeName(f), O_RDONLY, 0666);
int fd = QT_OPEN(QFile::encodeName(f), O_RDONLY);
if (fd >= 0) {
QT_STATBUF st;
if (!QT_FSTAT(fd, &st) && st.st_size <= std::numeric_limits<qsizetype>::max()) {