Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
16bbc5e8
Commit
16bbc5e8
authored
Jan 01, 2015
by
ctrlaltca
Browse files
Merge pull request #516 from mcallahan/compilation-warnings
Clean up a small pile of compiler warnings.
parents
0f1c8c59
3a0c8693
Changes
8
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
16bbc5e8
...
@@ -79,9 +79,9 @@ ELSEIF (CMAKE_COMPILER_IS_GNUCXX)
...
@@ -79,9 +79,9 @@ ELSEIF (CMAKE_COMPILER_IS_GNUCXX)
include
(
CheckCXXCompilerFlag
)
include
(
CheckCXXCompilerFlag
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-s -O2"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-s -O2"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-ggdb -O0 -Wall -Wextra
-pedantic
-Werror"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-ggdb -O0 -Wall -Wextra -Werror"
)
set
(
ADDITIONAL_DEBUG_FLAGS -Wcast-align -Wmissing-declarations
-Winline
-Wno-long-long -Wno-error=extra
-Wno-error=unused-parameter -Wno-inline
-Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare
-Wno-error=reorder
-Wno-error=missing-declarations
)
set
(
ADDITIONAL_DEBUG_FLAGS -Wcast-align -Wmissing-declarations -Wno-long-long -Wno-error=extra -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=missing-declarations
)
FOREACH
(
FLAG
${
ADDITIONAL_DEBUG_FLAGS
}
)
FOREACH
(
FLAG
${
ADDITIONAL_DEBUG_FLAGS
}
)
CHECK_CXX_COMPILER_FLAG
(
"
${
FLAG
}
"
CXX_HAS_WARNING_
${
FLAG
}
)
CHECK_CXX_COMPILER_FLAG
(
"
${
FLAG
}
"
CXX_HAS_WARNING_
${
FLAG
}
)
...
...
cockatrice/src/carddatabase.cpp
View file @
16bbc5e8
...
@@ -31,7 +31,7 @@ static QXmlStreamWriter &operator<<(QXmlStreamWriter &xml, const CardSet *set)
...
@@ -31,7 +31,7 @@ static QXmlStreamWriter &operator<<(QXmlStreamWriter &xml, const CardSet *set)
}
}
CardSet
::
CardSet
(
const
QString
&
_shortName
,
const
QString
&
_longName
,
const
QString
&
_setType
,
const
QDate
&
_releaseDate
)
CardSet
::
CardSet
(
const
QString
&
_shortName
,
const
QString
&
_longName
,
const
QString
&
_setType
,
const
QDate
&
_releaseDate
)
:
shortName
(
_shortName
),
longName
(
_longName
),
setType
(
_setType
),
releaseDate
(
_releaseDate
)
:
shortName
(
_shortName
),
longName
(
_longName
),
releaseDate
(
_releaseDate
)
,
setType
(
_setType
)
{
{
updateSortKey
();
updateSortKey
();
}
}
...
...
cockatrice/src/dlg_connect.cpp
View file @
16bbc5e8
...
@@ -75,6 +75,7 @@ DlgConnect::DlgConnect(QWidget *parent)
...
@@ -75,6 +75,7 @@ DlgConnect::DlgConnect(QWidget *parent)
void
DlgConnect
::
passwordSaved
(
int
state
)
void
DlgConnect
::
passwordSaved
(
int
state
)
{
{
Q_UNUSED
(
state
);
if
(
savePasswordCheckBox
->
isChecked
())
{
if
(
savePasswordCheckBox
->
isChecked
())
{
autoConnectCheckBox
->
setEnabled
(
true
);
autoConnectCheckBox
->
setEnabled
(
true
);
}
else
{
}
else
{
...
...
cockatrice/src/filtertree.h
View file @
16bbc5e8
...
@@ -154,7 +154,7 @@ public:
...
@@ -154,7 +154,7 @@ public:
FilterTreeNode
*
termNode
(
const
CardFilter
*
f
);
FilterTreeNode
*
termNode
(
const
CardFilter
*
f
);
FilterTreeNode
*
attrTypeNode
(
CardFilter
::
Attr
attr
,
FilterTreeNode
*
attrTypeNode
(
CardFilter
::
Attr
attr
,
CardFilter
::
Type
type
);
CardFilter
::
Type
type
);
const
char
*
textCStr
()
{
return
"root"
;
}
const
char
*
textCStr
()
const
{
return
"root"
;
}
int
index
()
const
{
return
0
;
}
int
index
()
const
{
return
0
;
}
bool
acceptsCard
(
const
CardInfo
*
info
)
const
;
bool
acceptsCard
(
const
CardInfo
*
info
)
const
;
...
...
cockatrice/src/setsmodel.h
View file @
16bbc5e8
...
@@ -29,7 +29,7 @@ public:
...
@@ -29,7 +29,7 @@ public:
SetsModel
(
CardDatabase
*
_db
,
QObject
*
parent
=
0
);
SetsModel
(
CardDatabase
*
_db
,
QObject
*
parent
=
0
);
~
SetsModel
();
~
SetsModel
();
int
rowCount
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
;
int
rowCount
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
;
int
columnCount
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
{
return
NUM_COLS
;
}
int
columnCount
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
{
Q_UNUSED
(
parent
);
return
NUM_COLS
;
}
QVariant
data
(
const
QModelIndex
&
index
,
int
role
)
const
;
QVariant
data
(
const
QModelIndex
&
index
,
int
role
)
const
;
QVariant
headerData
(
int
section
,
Qt
::
Orientation
orientation
,
int
role
=
Qt
::
DisplayRole
)
const
;
QVariant
headerData
(
int
section
,
Qt
::
Orientation
orientation
,
int
role
=
Qt
::
DisplayRole
)
const
;
Qt
::
ItemFlags
flags
(
const
QModelIndex
&
index
)
const
;
Qt
::
ItemFlags
flags
(
const
QModelIndex
&
index
)
const
;
...
...
oracle/src/oracleimporter.h
View file @
16bbc5e8
...
@@ -21,7 +21,7 @@ public:
...
@@ -21,7 +21,7 @@ public:
bool
getImport
()
const
{
return
import
;
}
bool
getImport
()
const
{
return
import
;
}
void
setImport
(
bool
_import
)
{
import
=
_import
;
}
void
setImport
(
bool
_import
)
{
import
=
_import
;
}
SetToDownload
(
const
QString
&
_shortName
,
const
QString
&
_longName
,
const
QVariant
&
_cards
,
bool
_import
,
const
QString
&
_setType
=
QString
(),
const
QDate
&
_releaseDate
=
QDate
())
SetToDownload
(
const
QString
&
_shortName
,
const
QString
&
_longName
,
const
QVariant
&
_cards
,
bool
_import
,
const
QString
&
_setType
=
QString
(),
const
QDate
&
_releaseDate
=
QDate
())
:
shortName
(
_shortName
),
longName
(
_longName
),
import
(
_import
),
cards
(
_cards
),
setType
(
_setType
),
releaseDate
(
_releaseDate
)
{
}
:
shortName
(
_shortName
),
longName
(
_longName
),
import
(
_import
),
cards
(
_cards
),
releaseDate
(
_releaseDate
)
,
setType
(
_setType
)
{
}
bool
operator
<
(
const
SetToDownload
&
set
)
const
{
return
longName
.
compare
(
set
.
longName
,
Qt
::
CaseInsensitive
)
<
0
;
}
bool
operator
<
(
const
SetToDownload
&
set
)
const
{
return
longName
.
compare
(
set
.
longName
,
Qt
::
CaseInsensitive
)
<
0
;
}
};
};
...
...
servatrice/src/servatrice.cpp
View file @
16bbc5e8
...
@@ -108,7 +108,11 @@ void Servatrice_GameServer::incomingConnection(qintptr socketDescriptor)
...
@@ -108,7 +108,11 @@ void Servatrice_GameServer::incomingConnection(qintptr socketDescriptor)
QMetaObject
::
invokeMethod
(
ssi
,
"initConnection"
,
Qt
::
QueuedConnection
,
Q_ARG
(
int
,
socketDescriptor
));
QMetaObject
::
invokeMethod
(
ssi
,
"initConnection"
,
Qt
::
QueuedConnection
,
Q_ARG
(
int
,
socketDescriptor
));
}
}
#if QT_VERSION < 0x050000
void
Servatrice_IslServer
::
incomingConnection
(
int
socketDescriptor
)
void
Servatrice_IslServer
::
incomingConnection
(
int
socketDescriptor
)
#else
void
Servatrice_IslServer
::
incomingConnection
(
qintptr
socketDescriptor
)
#endif
{
{
QThread
*
thread
=
new
QThread
;
QThread
*
thread
=
new
QThread
;
connect
(
thread
,
SIGNAL
(
finished
()),
thread
,
SLOT
(
deleteLater
()));
connect
(
thread
,
SIGNAL
(
finished
()),
thread
,
SLOT
(
deleteLater
()));
...
...
servatrice/src/servatrice.h
View file @
16bbc5e8
...
@@ -68,7 +68,11 @@ public:
...
@@ -68,7 +68,11 @@ public:
Servatrice_IslServer
(
Servatrice
*
_server
,
const
QSslCertificate
&
_cert
,
const
QSslKey
&
_privateKey
,
QObject
*
parent
=
0
)
Servatrice_IslServer
(
Servatrice
*
_server
,
const
QSslCertificate
&
_cert
,
const
QSslKey
&
_privateKey
,
QObject
*
parent
=
0
)
:
QTcpServer
(
parent
),
server
(
_server
),
cert
(
_cert
),
privateKey
(
_privateKey
)
{
}
:
QTcpServer
(
parent
),
server
(
_server
),
cert
(
_cert
),
privateKey
(
_privateKey
)
{
}
protected:
protected:
#if QT_VERSION < 0x050000
void
incomingConnection
(
int
socketDescriptor
);
void
incomingConnection
(
int
socketDescriptor
);
#else
void
incomingConnection
(
qintptr
socketDescriptor
);
#endif
};
};
class
ServerProperties
{
class
ServerProperties
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment