From: Marcin Cieslak <saper@saper.info>
Date: Mon, 24 Sep 2012 11:36:15 +0000 (+0200)
Subject: dtmail: warning: 'DtMailBoolean' is promoted to (int)
X-Git-Tag: 2.2.0c~39
X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e3564643ad6864624fbbe277c78bbc1288d414f3;p=oweals%2Fcde.git

dtmail: warning: 'DtMailBoolean' is promoted to (int)

Fix this warning:

RFCTransport.C: In function 'long unsigned int writeToFileDesc(const char*, int,
 __va_list_tag*)':
RFCTransport.C:91: warning: 'DtMailBoolean' is promoted to 'int' when passed thr
ough '...'
RFCTransport.C:91: warning: (so you should pass 'int' not 'DtMailBoolean' to 'va
_arg')
RFCTransport.C:91: note: if this code is reached, the program will abort
---

diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C b/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C
index eab791cb..7659ff84 100644
--- a/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C
+++ b/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C
@@ -88,7 +88,7 @@ writeToFileDesc(const char * buf, int len, va_list args)
 {
     int * fds = va_arg(args, int *);
     int cnt = va_arg(args, int);
-    DtMailBoolean strip = va_arg(args, DtMailBoolean);
+    DtMailBoolean strip = (DtMailBoolean)va_arg(args, int);
 
     unsigned long saveErrno = 0;	// Initially no error recorded