mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
dtdocbook: ensure the correct data type is passed into the variable
argument list.
This commit is contained in:
parent
1adb29e6a7
commit
a046a95d81
3 changed files with 9 additions and 9 deletions
|
@ -434,9 +434,9 @@ DBCursor::~DBCursor()
|
||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
||||||
void DBCursor::string_field(FILE *fp, char **out, int *lenOut)
|
void DBCursor::string_field(FILE *fp, char **out, size_t *lenOut)
|
||||||
{
|
{
|
||||||
int len = 0;
|
size_t len = 0;
|
||||||
int io;
|
int io;
|
||||||
|
|
||||||
/* fscanf is weird, so we do it ourselves... */
|
/* fscanf is weird, so we do it ourselves... */
|
||||||
|
@ -568,13 +568,13 @@ int DBCursor::next(int typeCode, ...)
|
||||||
case STRING_CODE:
|
case STRING_CODE:
|
||||||
{
|
{
|
||||||
char **data = NULL;
|
char **data = NULL;
|
||||||
int *len = NULL;
|
size_t *len = NULL;
|
||||||
|
|
||||||
if (fieldCode == typeCode || (fieldCode + typeCode) == 0) {
|
if (fieldCode == typeCode || (fieldCode + typeCode) == 0) {
|
||||||
data = va_arg(ap, char**);
|
data = va_arg(ap, char**);
|
||||||
|
|
||||||
if (fieldCode != typeCode) {
|
if (fieldCode != typeCode) {
|
||||||
len = va_arg(ap, int*);
|
len = va_arg(ap, size_t*);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ class DBCursor{
|
||||||
void seekToRec( int pos ); /* seek directly to pos */
|
void seekToRec( int pos ); /* seek directly to pos */
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void string_field(FILE *, char **, int *);
|
void string_field(FILE *, char **, size_t *);
|
||||||
void int_field(FILE *, int *);
|
void int_field(FILE *, int *);
|
||||||
void short_list(FILE *, int *, int, void*);
|
void short_list(FILE *, int *, int, void*);
|
||||||
|
|
||||||
|
|
|
@ -71,9 +71,9 @@ writeStyleSheets(BookCaseDB& db)
|
||||||
|
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *online;
|
const char *online;
|
||||||
int len_o;
|
size_t len_o;
|
||||||
const char *print;
|
const char *print;
|
||||||
int len_p;
|
size_t len_p;
|
||||||
|
|
||||||
int statusO = 0;
|
int statusO = 0;
|
||||||
int statusP = 0;
|
int statusP = 0;
|
||||||
|
@ -98,8 +98,8 @@ writeStyleSheets(BookCaseDB& db)
|
||||||
}
|
}
|
||||||
|
|
||||||
out->insert(STRING_CODE, name,
|
out->insert(STRING_CODE, name,
|
||||||
-STRING_CODE, online, (size_t)len_o,
|
-STRING_CODE, online, len_o,
|
||||||
-STRING_CODE, print, (size_t)len_p,
|
-STRING_CODE, print, len_p,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue