mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Silence compiler warnings about unused parameters
This commit is contained in:
parent
6abdbb2ad7
commit
d55eb917e2
@ -6,7 +6,7 @@ export TOPDIR=@abs_srcdir@
|
||||
export VERSION=@PACKAGE_VERSION@
|
||||
|
||||
CPPFLAGS=-DXCA_PREFIX=\"${xca_prefix}\" -DETC=\"@sysconfdir@\" -DDOCDIR=\"@docdir@\" @CXXFLAGS@
|
||||
CFLAGS=-Wall -ggdb -O2
|
||||
CFLAGS=-Wall -Wextra -O2
|
||||
LIBS=@LIBS@
|
||||
|
||||
MOC=@QT_MOC@
|
||||
|
||||
@ -520,7 +520,7 @@ QVariant db_base::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
static QVariant getHeaderViewInfo(int sect, dbheader *h)
|
||||
static QVariant getHeaderViewInfo(dbheader *h)
|
||||
{
|
||||
return QVariant(
|
||||
#if 0
|
||||
@ -541,7 +541,7 @@ QVariant db_base::headerData(int section, Qt::Orientation orientation,
|
||||
case Qt::DisplayRole:
|
||||
return QVariant(allHeaders[section]->getName());
|
||||
case Qt::ToolTipRole:
|
||||
return getHeaderViewInfo(section, allHeaders[section]);
|
||||
return getHeaderViewInfo(allHeaders[section]);
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
|
||||
@ -47,6 +47,7 @@ class db_base: public QAbstractItemModel
|
||||
int handleBadEntry(unsigned char *p, db_header_t *head);
|
||||
virtual exportType::etype clipboardFormat(QModelIndexList indexes)
|
||||
{
|
||||
(void)indexes;
|
||||
return exportType::Separator;
|
||||
}
|
||||
|
||||
@ -99,7 +100,7 @@ class db_base: public QAbstractItemModel
|
||||
colResizing--;
|
||||
}
|
||||
virtual void store(QModelIndexList indexes);
|
||||
virtual void store(QModelIndex index) { };
|
||||
virtual void store(QModelIndex index) { (void)index; };
|
||||
dbheaderList getAllHeaders() {
|
||||
return allHeaders;
|
||||
}
|
||||
|
||||
@ -366,6 +366,10 @@ bool _ign_openssl_error(const QString txt, const char *file, int line)
|
||||
#if PRINT_IGNORED_ANYWAY
|
||||
if (!txt.isEmpty() && ERR_peek_error())
|
||||
fprintf(stderr, "%s\n", CCHAR(txt));
|
||||
#else
|
||||
(void)txt;
|
||||
(void)file;
|
||||
(void)line;
|
||||
#endif
|
||||
while (int i = ERR_get_error() ) {
|
||||
errtxt = ERR_error_string(i, NULL);
|
||||
|
||||
@ -124,6 +124,7 @@ bool XCA_application::eventFilter(QObject *watched, QEvent *ev)
|
||||
QStringList l;
|
||||
int key;
|
||||
|
||||
(void)watched;
|
||||
switch (ev->type()) {
|
||||
case QEvent::FileOpen:
|
||||
l << static_cast<QFileOpenEvent *>(ev)->file();
|
||||
|
||||
@ -470,6 +470,9 @@ pk11_attr_data pkcs11::findUniqueID(unsigned long oclass)
|
||||
pk11_attr_data pkcs11::generateKey(QString name, unsigned long mech,
|
||||
unsigned long bits, int nid)
|
||||
{
|
||||
#ifdef OPENSSL_NO_EC
|
||||
(void)nid;
|
||||
#endif
|
||||
CK_RV rv;
|
||||
CK_OBJECT_HANDLE pubkey, privkey, dsa_param_obj;
|
||||
pk11_attlist priv_atts, pub_atts, dsa_param;
|
||||
@ -738,6 +741,7 @@ static int eng_pmeth_ctrl_rsa(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
|
||||
|
||||
static int eng_pmeth_ctrl_dsa(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
|
||||
{
|
||||
(void)p1;
|
||||
switch (type) {
|
||||
case EVP_PKEY_CTRL_MD:
|
||||
EVP_PKEY_CTX_set_data(ctx, NULL);
|
||||
@ -758,6 +762,7 @@ static int eng_pmeth_ctrl_dsa(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
|
||||
#ifndef OPENSSL_NO_EC
|
||||
static int eng_pmeth_ctrl_ec(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
|
||||
{
|
||||
(void)p1;
|
||||
switch (type) {
|
||||
case EVP_PKEY_CTRL_MD:
|
||||
EVP_PKEY_CTX_set_data(ctx, NULL);
|
||||
@ -936,6 +941,7 @@ static int eng_pmeth_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)
|
||||
static int eng_meths(ENGINE *e, EVP_PKEY_METHOD **m, const int **nids, int nid)
|
||||
{
|
||||
static const int my_nids[] = { EVP_PKEY_EC, EVP_PKEY_RSA };
|
||||
(void)e;
|
||||
if (m) {
|
||||
switch (nid) {
|
||||
#ifndef OPENSSL_NO_EC
|
||||
|
||||
@ -185,6 +185,7 @@ QVariant pki_base::column_data(dbheader *hd)
|
||||
|
||||
QVariant pki_base::getIcon(dbheader *hd)
|
||||
{
|
||||
(void)hd;
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
|
||||
@ -100,6 +100,7 @@ class pki_base : public QObject
|
||||
}
|
||||
virtual BIO *pem(BIO *, int format=0)
|
||||
{
|
||||
(void)format;
|
||||
return NULL;
|
||||
}
|
||||
void fwrite_ba(FILE *fp, QByteArray ba, QString fname);
|
||||
|
||||
@ -214,6 +214,7 @@ void pki_crl::writeCrl(const QString fname, bool pem)
|
||||
|
||||
BIO *pki_crl::pem(BIO *b, int format)
|
||||
{
|
||||
(void)format;
|
||||
if (!b)
|
||||
b = BIO_new(BIO_s_mem());
|
||||
PEM_write_bio_X509_CRL(b, crl);
|
||||
|
||||
@ -77,6 +77,9 @@ void pki_evp::generate(int bits, int type, QProgressBar *progress, int curve_nid
|
||||
{
|
||||
Entropy::seed_rng();
|
||||
|
||||
#ifdef OPENSSL_NO_EC
|
||||
(void)curve_nid;
|
||||
#endif
|
||||
progress->setMinimum(0);
|
||||
progress->setMaximum(100);
|
||||
progress->setValue(50);
|
||||
@ -232,6 +235,8 @@ static void search_ec_oid(EVP_PKEY *pkey)
|
||||
}
|
||||
EC_GROUP_free(builtin);
|
||||
}
|
||||
#else
|
||||
(void)pkey;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -359,6 +359,7 @@ void pki_temp::writeDefault(const QString fname)
|
||||
|
||||
BIO *pki_temp::pem(BIO *b, int format)
|
||||
{
|
||||
(void)format;
|
||||
QByteArray ba = toExportData();
|
||||
if (!b)
|
||||
b = BIO_new(BIO_s_mem());
|
||||
|
||||
@ -585,6 +585,7 @@ void pki_x509::writeCert(const QString fname, bool PEM, bool append)
|
||||
|
||||
BIO *pki_x509::pem(BIO *b, int format)
|
||||
{
|
||||
(void)format;
|
||||
if (!b)
|
||||
b = BIO_new(BIO_s_mem());
|
||||
PEM_write_bio_X509(b, cert);
|
||||
|
||||
@ -257,6 +257,7 @@ void pki_x509req::writeReq(const QString fname, bool pem)
|
||||
|
||||
BIO *pki_x509req::pem(BIO *b, int format)
|
||||
{
|
||||
(void)format;
|
||||
if (!b)
|
||||
b = BIO_new(BIO_s_mem());
|
||||
PEM_write_bio_X509_REQ(b, request);
|
||||
|
||||
@ -95,7 +95,7 @@ class x509rev
|
||||
}
|
||||
X509_REVOKED *get(bool withReason=true) const
|
||||
{
|
||||
return toREVOKED();
|
||||
return toREVOKED(withReason);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -211,6 +211,8 @@ void NewKey::updateCurves(unsigned min, unsigned max, unsigned long ec_flags)
|
||||
curveBox->setCurrentIndex(curveBox->findText(ec_default));
|
||||
if (curveBox->currentIndex() == -1)
|
||||
curveBox->setCurrentIndex(0);
|
||||
#else
|
||||
(void)min; (void)max; (void)ec_flags;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -15,6 +15,8 @@
|
||||
void TempTreeView::fillContextMenu(QMenu *menu, QMenu *subExport,
|
||||
const QModelIndex &index, QModelIndexList indexes)
|
||||
{
|
||||
(void)subExport;
|
||||
(void)index;
|
||||
if (indexes.size() != 1)
|
||||
return;
|
||||
menu->addAction(tr("Duplicate"), this, SLOT(duplicateTemp()));
|
||||
|
||||
@ -39,7 +39,10 @@ class XcaTreeView: public QTreeView
|
||||
void showContextMenu(QContextMenuEvent *e,
|
||||
const QModelIndex &index);
|
||||
virtual void fillContextMenu(QMenu *menu, QMenu *subExport,
|
||||
const QModelIndex &index, QModelIndexList indexes) {}
|
||||
const QModelIndex &index, QModelIndexList indexes)
|
||||
{
|
||||
(void)menu; (void)subExport; (void)index; (void)indexes;
|
||||
}
|
||||
void contextMenu(QContextMenuEvent *e,
|
||||
QMenu *parent = NULL, int sect = -1);
|
||||
|
||||
|
||||
2
xca.pro
2
xca.pro
@ -17,7 +17,7 @@ macx {
|
||||
}
|
||||
|
||||
LIBS += -lcrypto -lltdl
|
||||
QMAKE_CXXFLAGS = -Wno-unused-parameters -DPREFIX=\\\"/usr/local\\\" -DETC=\\\"/etc\\\" -DDOCDIR=\\\"/usr/local/doc/xca\\\"
|
||||
QMAKE_CXXFLAGS = -DPREFIX=\\\"/usr/local\\\" -DETC=\\\"/etc\\\" -DDOCDIR=\\\"/usr/local/doc/xca\\\" -Werror
|
||||
|
||||
# Input
|
||||
HEADERS += local.h \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user