-
Notifications
You must be signed in to change notification settings - Fork 242
[build] Fix shadow and missing-decl errors #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
crueter
wants to merge
4
commits into
stachenov:master
Choose a base branch
from
crueter:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+37
−17
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Still a bunch to fix but whatever Signed-off-by: crueter <[email protected]>
Signed-off-by: crueter <[email protected]>
Signed-off-by: crueter <[email protected]>
Confirmed to build properly on Linux/amd64, Linux/aarch64, and Windows/amd64. Currently awaiting confirmation on Windows/aarch64, FreeBSD, and macOS. |
Signed-off-by: crueter <[email protected]>
self reminder diff --git a/quazip/ioapi.h b/quazip/ioapi.h
index 08b9736..3d7c42a 100644
--- a/quazip/ioapi.h
+++ b/quazip/ioapi.h
@@ -126,9 +126,6 @@ extern "C" {
#endif
#endif
-
-
-
typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, voidpf file, int mode));
typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
@@ -138,7 +135,6 @@ typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stre
typedef uLong (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
typedef int (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
-
/* here is the "old" 32 bits structure structure */
typedef struct zlib_filefunc_def_s
{
diff --git a/quazip/quagzipfile.cpp b/quazip/quagzipfile.cpp
index aafbc8b..bcdc549 100644
--- a/quazip/quagzipfile.cpp
+++ b/quazip/quagzipfile.cpp
@@ -33,8 +33,8 @@ class QuaGzipFilePrivate {
QString fileName;
gzFile gzd;
inline QuaGzipFilePrivate(): gzd(nullptr) {}
- inline QuaGzipFilePrivate(const QString &fileName):
- fileName(fileName), gzd(nullptr) {}
+ inline QuaGzipFilePrivate(const QString &_fileName):
+ fileName(_fileName), gzd(nullptr) {}
template<typename FileId> bool open(FileId id,
QIODevice::OpenMode mode, QString &error);
gzFile open(int fd, const char *modeString);
diff --git a/quazip/quaziodevice.cpp b/quazip/quaziodevice.cpp
index 0706929..4e17d5f 100644
--- a/quazip/quaziodevice.cpp
+++ b/quazip/quaziodevice.cpp
@@ -50,9 +50,9 @@ class QuaZIODevicePrivate {
int doFlush(QString &error);
};
-QuaZIODevicePrivate::QuaZIODevicePrivate(QIODevice *io, QuaZIODevice *q):
- io(io),
- q(q)
+QuaZIODevicePrivate::QuaZIODevicePrivate(QIODevice *_io, QuaZIODevice *_q):
+ io(_io),
+ q(_q)
{
zins.zalloc = (alloc_func) nullptr;
zins.zfree = (free_func) nullptr;
diff --git a/quazip/quazip.cpp b/quazip/quazip.cpp
index 4864802..5a548d4 100644
--- a/quazip/quazip.cpp
+++ b/quazip/quazip.cpp
@@ -73,8 +73,8 @@ class QuaZipPrivate {
/// The OS code.
uint osCode;
/// The constructor for the corresponding QuaZip constructor.
- inline QuaZipPrivate(QuaZip *q):
- q(q),
+ inline QuaZipPrivate(QuaZip *_q):
+ q(_q),
ioDevice(nullptr),
mode(QuaZip::mdNotOpen),
hasCurrentFile_f(false),
@@ -91,9 +91,9 @@ class QuaZipPrivate {
lastMappedDirectoryEntry.pos_in_zip_directory = 0;
}
/// The constructor for the corresponding QuaZip constructor.
- inline QuaZipPrivate(QuaZip *q, const QString &zipName):
- q(q),
- zipName(zipName),
+ inline QuaZipPrivate(QuaZip *_q, const QString &_zipName):
+ q(_q),
+ zipName(_zipName),
ioDevice(nullptr),
mode(QuaZip::mdNotOpen),
hasCurrentFile_f(false),
@@ -110,9 +110,9 @@ class QuaZipPrivate {
lastMappedDirectoryEntry.pos_in_zip_directory = 0;
}
/// The constructor for the corresponding QuaZip constructor.
- inline QuaZipPrivate(QuaZip *q, QIODevice *ioDevice):
- q(q),
- ioDevice(ioDevice),
+ inline QuaZipPrivate(QuaZip *_q, QIODevice *_ioDevice):
+ q(_q),
+ ioDevice(_ioDevice),
mode(QuaZip::mdNotOpen),
hasCurrentFile_f(false),
zipError(UNZ_OK),
diff --git a/quazip/quazipdir.cpp b/quazip/quazipdir.cpp
index eb24bf1..9ad3a24 100644
--- a/quazip/quazipdir.cpp
+++ b/quazip/quazipdir.cpp
@@ -32,8 +32,8 @@ see quazip/(un)zip.h files for details. Basically it's the zlib license.
class QuaZipDirPrivate: public QSharedData {
friend class QuaZipDir;
private:
- QuaZipDirPrivate(QuaZip *zip, const QString &dir = QString()):
- zip(zip), dir(dir) {}
+ QuaZipDirPrivate(QuaZip *_zip, const QString &_dir = QString()):
+ zip(_zip), dir(_dir) {}
QuaZip *zip;
QString dir;
QuaZip::CaseSensitivity caseSensitivity{QuaZip::csDefault};
@@ -199,8 +199,8 @@ static void QuaZipDir_convertInfoList(const QList<QuaZipFileInfo64> &from,
*/
class QuaZipDirRestoreCurrent {
public:
- inline QuaZipDirRestoreCurrent(QuaZip *zip):
- zip(zip), currentFile(zip->getCurrentFileName()) {}
+ inline QuaZipDirRestoreCurrent(QuaZip *_zip):
+ zip(_zip), currentFile(_zip->getCurrentFileName()) {}
inline ~QuaZipDirRestoreCurrent()
{
zip->setCurrentFile(currentFile);
@@ -219,7 +219,7 @@ class QuaZipDirComparator
static QString getExtension(const QString &name);
int compareStrings(const QString &string1, const QString &string2);
public:
- inline QuaZipDirComparator(QDir::SortFlags sort): sort(sort) {}
+ inline QuaZipDirComparator(QDir::SortFlags _sort): sort(_sort) {}
bool operator()(const QuaZipFileInfo64 &info1, const QuaZipFileInfo64 &info2);
};
diff --git a/quazip/quazipdir.h b/quazip/quazipdir.h
index a4922b9..43905a8 100644
--- a/quazip/quazipdir.h
+++ b/quazip/quazipdir.h
@@ -220,4 +220,9 @@ public:
QDir::SortFlags sorting() const;
};
+QuaZipFileInfo64 QuaZipDir_getFileInfo(QuaZip *zip,
+ bool *ok,
+ const QString &relativeName,
+ bool isReal);
+
#endif // QUAZIP_QUAZIPDIR_H
diff --git a/quazip/quazipfile.cpp b/quazip/quazipfile.cpp
index 5934992..2dcf387 100644
--- a/quazip/quazipfile.cpp
+++ b/quazip/quazipfile.cpp
@@ -80,8 +80,8 @@ class QuaZipFilePrivate {
*/
void setZipError(int zipError) const;
/// The constructor for the corresponding QuaZipFile constructor.
- inline QuaZipFilePrivate(QuaZipFile *q):
- q(q),
+ inline QuaZipFilePrivate(QuaZipFile *_q):
+ q(_q),
zip(nullptr),
caseSensitivity(QuaZip::csDefault),
raw(false),
@@ -91,8 +91,8 @@ class QuaZipFilePrivate {
internal(true),
zipError(UNZ_OK) {}
/// The constructor for the corresponding QuaZipFile constructor.
- inline QuaZipFilePrivate(QuaZipFile *q, const QString &zipName):
- q(q),
+ inline QuaZipFilePrivate(QuaZipFile *_q, const QString &_zipName):
+ q(_q),
caseSensitivity(QuaZip::csDefault),
raw(false),
writePos(0),
@@ -101,12 +101,12 @@ class QuaZipFilePrivate {
internal(true),
zipError(UNZ_OK)
{
- zip=new QuaZip(zipName);
+ zip=new QuaZip(_zipName);
}
/// The constructor for the corresponding QuaZipFile constructor.
- inline QuaZipFilePrivate(QuaZipFile *q, const QString &zipName, const QString &fileName,
- QuaZip::CaseSensitivity cs):
- q(q),
+ inline QuaZipFilePrivate(QuaZipFile *_q, const QString &_zipName, const QString &_fileName,
+ QuaZip::CaseSensitivity _cs):
+ q(_q),
raw(false),
writePos(0),
uncompressedSize(0),
@@ -114,16 +114,16 @@ class QuaZipFilePrivate {
internal(true),
zipError(UNZ_OK)
{
- zip=new QuaZip(zipName);
- this->fileName=fileName;
+ zip=new QuaZip(_zipName);
+ this->fileName=_fileName;
if (this->fileName.startsWith(QLatin1String("/")))
this->fileName = this->fileName.mid(1);
- this->caseSensitivity=cs;
+ this->caseSensitivity=_cs;
}
/// The constructor for the QuaZipFile constructor accepting a file name.
- inline QuaZipFilePrivate(QuaZipFile *q, QuaZip *zip):
- q(q),
- zip(zip),
+ inline QuaZipFilePrivate(QuaZipFile *_q, QuaZip *_zip):
+ q(_q),
+ zip(_zip),
raw(false),
writePos(0),
uncompressedSize(0),
diff --git a/quazip/quazipnewinfo.cpp b/quazip/quazipnewinfo.cpp
index b55bb1b..38e6ad7 100644
--- a/quazip/quazipnewinfo.cpp
+++ b/quazip/quazipnewinfo.cpp
@@ -86,14 +86,14 @@ QuaZipNewInfo::QuaZipNewInfo(const QuaZipFileInfo64 &existing)
QuaZipNewInfo_init(*this, existing);
}
-QuaZipNewInfo::QuaZipNewInfo(const QString& name):
- name(name), dateTime(QDateTime::currentDateTime()), internalAttr(0), externalAttr(0),
+QuaZipNewInfo::QuaZipNewInfo(const QString& _name):
+ name(_name), dateTime(QDateTime::currentDateTime()), internalAttr(0), externalAttr(0),
uncompressedSize(0)
{
}
-QuaZipNewInfo::QuaZipNewInfo(const QString& name, const QString& file):
- name(name), internalAttr(0), externalAttr(0), uncompressedSize(0)
+QuaZipNewInfo::QuaZipNewInfo(const QString& _name, const QString& file):
+ name(_name), internalAttr(0), externalAttr(0), uncompressedSize(0)
{
QFileInfo info(file);
QDateTime lm = info.lastModified();
@@ -105,8 +105,8 @@ QuaZipNewInfo::QuaZipNewInfo(const QString& name, const QString& file):
}
}
-QuaZipNewInfo::QuaZipNewInfo(const QString& name, const QString& file, const QDateTime& dateTime):
- name(name), dateTime(dateTime), internalAttr(0), externalAttr(0), uncompressedSize(0)
+QuaZipNewInfo::QuaZipNewInfo(const QString& _name, const QString& file, const QDateTime& _dateTime):
+ name(_name), dateTime(_dateTime), internalAttr(0), externalAttr(0), uncompressedSize(0)
{
QFileInfo info(file);
if (info.exists()) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #230
still needs some more work