fix missing prototypes in config system

This commit is contained in:
Rainer Gerhards 2016-06-01 10:32:29 +02:00
parent f49313c174
commit 887fcfac9e
4 changed files with 9 additions and 7 deletions

View File

@ -962,7 +962,7 @@ dbgoprint(obj_t *pObj, char *fmt, ...)
* WARNING: duplicate code, see dbgoprin above!
*/
void
dbgprintf(char *fmt, ...)
dbgprintf(const char *fmt, ...)
{
va_list ap;
char pszWriteBuf[32*1024];

View File

@ -232,7 +232,7 @@ rsRetVal objName##ClassExit(void) \
* rgerhards, 2008-01-10
*/
#define BEGINobjConstruct(obj) \
rsRetVal obj##Initialize(obj##_t __attribute__((unused)) *pThis) \
static rsRetVal obj##Initialize(obj##_t __attribute__((unused)) *pThis) \
{ \
DEFiRet;
@ -240,6 +240,7 @@ rsRetVal objName##ClassExit(void) \
/* use finalize_it: before calling the macro (if you need it)! */ \
RETiRet; \
} \
rsRetVal obj##Construct(obj##_t **ppThis); \
rsRetVal obj##Construct(obj##_t **ppThis) \
{ \
DEFiRet; \
@ -278,6 +279,8 @@ rsRetVal objName##ClassExit(void) \
* processing.
* rgerhards, 2008-01-30
*/
#define PROTOTYPEobjDestruct(OBJ) \
rsRetVal OBJ##Destruct(OBJ##_t __attribute__((unused)) **ppThis)
#define BEGINobjDestruct(OBJ) \
rsRetVal OBJ##Destruct(OBJ##_t __attribute__((unused)) **ppThis) \
{ \

View File

@ -177,7 +177,8 @@ ENDobjConstruct(rsconf)
/* ConstructionFinalizer
*/
rsRetVal rsconfConstructFinalize(rsconf_t __attribute__((unused)) *pThis)
static rsRetVal
rsconfConstructFinalize(rsconf_t __attribute__((unused)) *pThis)
{
DEFiRet;
ISOBJ_TYPE_assert(pThis, rsconf);
@ -206,6 +207,7 @@ freeCnf(rsconf_t *pThis)
/* destructor for the rsconf object */
PROTOTYPEobjDestruct(rsconf);
BEGINobjDestruct(rsconf) /* be sure to specify the object type also in END and CODESTART macros! */
CODESTARTobjDestruct(rsconf)
freeCnf(pThis);
@ -219,6 +221,7 @@ ENDobjDestruct(rsconf)
/* DebugPrint support for the rsconf object */
PROTOTYPEObjDebugPrint(rsconf);
BEGINobjDebugPrint(rsconf) /* be sure to specify the object type also in END and CODESTART macros! */
cfgmodules_etry_t *modNode;
@ -1363,8 +1366,6 @@ CODESTARTobjQueryInterface(rsconf)
* work here (if we can support an older interface version - that,
* of course, also affects the "if" above).
*/
pIf->Construct = rsconfConstruct;
pIf->ConstructFinalize = rsconfConstructFinalize;
pIf->Destruct = rsconfDestruct;
pIf->DebugPrint = rsconfDebugPrint;
pIf->Load = load;

View File

@ -163,8 +163,6 @@ struct rsconf_s {
/* interfaces */
BEGINinterface(rsconf) /* name must also be changed in ENDinterface macro! */
INTERFACEObjDebugPrint(rsconf);
rsRetVal (*Construct)(rsconf_t **ppThis);
rsRetVal (*ConstructFinalize)(rsconf_t __attribute__((unused)) *pThis);
rsRetVal (*Destruct)(rsconf_t **ppThis);
rsRetVal (*Load)(rsconf_t **ppThis, uchar *confFile);
rsRetVal (*Activate)(rsconf_t *ppThis);