shut up compiler warnings and fix array-size

This commit is contained in:
chris 2009-02-26 07:41:21 +01:00
parent 8e8bbe2f1f
commit 485dfd2221
3 changed files with 5 additions and 5 deletions

View File

@ -145,7 +145,7 @@ int db::next(int flag)
return -1;
}
if (ret != sizeof(db_header_t)) {
printf("Length broken: %d instead of %d\n", ret,
printf("Length broken: %d instead of %z\n", ret,
sizeof(db_header_t) );
//ftruncate(fd, head_offset);
head_offset = OFF_EOF;
@ -184,7 +184,7 @@ int db::rename(enum pki_type type, QString name, QString n)
fileIOerr("write");
}
if (ret != sizeof(head)) {
printf("DB: Write error %d - %d\n", ret, sizeof(head));
printf("DB: Write error %d - %z\n", ret, sizeof(head));
return -1;
}
return 0;

View File

@ -11,7 +11,7 @@
#include "base.h"
#include <qdir.h>
QPixmap *pki_x509::icon[4] = { NULL, NULL, NULL, NULL };
QPixmap *pki_x509::icon[5] = { NULL, NULL, NULL, NULL, NULL };
pki_x509::pki_x509(X509 *c)
:pki_x509super()
@ -324,7 +324,7 @@ unsigned char *pki_x509::toData(int *size)
p1 = crlExpiry.i2d(p1); // last CRL date
openssl_error();
if (*size != p1-p) {
printf("pki_x509::toData: Size = %d, real size=%d\n", *size, p1-p);
printf("pki_x509::toData: Size = %d, real size=%ld\n", *size, p1-p);
//abort();
}
return p;

View File

@ -35,7 +35,7 @@ class pki_x509 : public pki_x509super
void init();
void set_date(ASN1_TIME **a, const a1time &a1);
public:
static QPixmap *icon[4];
static QPixmap *icon[5];
pki_x509(X509 *c);
pki_x509(const pki_x509 *crt);
pki_x509(const QString name = "");