This patch fixes this bug.
diff -u nepenthes-0.2.2/debian/patches/00list nepenthes-0.2.2/debian/patches/00list
--- nepenthes-0.2.2/debian/patches/00list
+++ nepenthes-0.2.2/debian/patches/00list
@@ -6,0 +7 @@
+07_warn_unused_result.dpatch
only in patch2:
unchanged:
--- nepenthes-0.2.2.orig/debian/patches/07_warn_unused_result.dpatch
+++ nepenthes-0.2.2/debian/patches/07_warn_unused_result.dpatch
@@ -0,0 +1,470 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 07_warn_unused_result.dpatch by Iain Lane <i...@orangesquash.org.uk>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: This package FTBFS with warn_unused_result and Werror without these changes.
+
+...@dpatch@
+diff -urNad nepenthes-0.2.2~/modules/download-creceive/CReceiveDialogue.cpp nepenthes-0.2.2/modules/download-creceive/CReceiveDialogue.cpp
+--- nepenthes-0.2.2~/modules/download-creceive/CReceiveDialogue.cpp	2007-02-06 15:16:52.000000000 +0000
++++ nepenthes-0.2.2/modules/download-creceive/CReceiveDialogue.cpp	2008-07-16 21:43:25.000000000 +0100
+@@ -72,6 +72,7 @@
+  */
+ CReceiveDialogue::CReceiveDialogue(Socket *socket)//, Download *down)
+ {
++	int res;
+ 	m_Socket = socket;
+     m_DialogueName = "CReceiveDialogue";
+ 	m_DialogueDescription = "eXample Dialogue";
+@@ -80,7 +81,7 @@
+ 	char *url;
+ 	uint32_t host = socket->getRemoteHost();
+ 	uint16_t port = socket->getRemotePort();
+-	asprintf(&url,"creceive://%s:%i",inet_ntoa(*(in_addr *)&host),port);
++	res = asprintf(&url,"creceive://%s:%i",inet_ntoa(*(in_addr *)&host),port);
+     m_Download = new Download(socket->getLocalHost(),url,socket->getRemoteHost(),url);
+ 	free(url);
+ }
+diff -urNad nepenthes-0.2.2~/modules/download-curl/download-curl.cpp nepenthes-0.2.2/modules/download-curl/download-curl.cpp
+--- nepenthes-0.2.2~/modules/download-curl/download-curl.cpp	2007-01-31 01:21:15.000000000 +0000
++++ nepenthes-0.2.2/modules/download-curl/download-curl.cpp	2008-07-16 21:43:26.000000000 +0100
+@@ -224,8 +224,9 @@
+ 	}else
+ 	if (down->getDownloadUrl()->getProtocol() == "ftp")
+ 	{
++		int res;
+ 		char *url;
+-		asprintf(&url,"ftp://%s:%i/%s";,
++		res = asprintf(&url,"ftp://%s:%i/%s";,
+ 				 down->getDownloadUrl()->getHost().c_str(),
+ 				 down->getDownloadUrl()->getPort(),
+ 				 down->getDownloadUrl()->getPath().c_str());
+diff -urNad nepenthes-0.2.2~/modules/download-ftp/CTRLDialogue.cpp nepenthes-0.2.2/modules/download-ftp/CTRLDialogue.cpp
+--- nepenthes-0.2.2~/modules/download-ftp/CTRLDialogue.cpp	2008-02-14 11:19:56.000000000 +0000
++++ nepenthes-0.2.2/modules/download-ftp/CTRLDialogue.cpp	2008-07-16 21:43:26.000000000 +0100
+@@ -322,7 +322,8 @@
+ void CTRLDialogue::sendUser()
+ {
+ 	char *msg;
+-	asprintf(&msg,"USER %s\r\n",m_Download->getDownloadUrl()->getUser().c_str());
++	int res;
++	res = asprintf(&msg,"USER %s\r\n",m_Download->getDownloadUrl()->getUser().c_str());
+ 	logDebug("FTPSEND: '%s'\n",msg);
+ 	m_Socket->doRespond(msg,strlen(msg));
+ 	free(msg);
+@@ -343,7 +344,8 @@
+ void CTRLDialogue::sendPass()
+ {
+ 	char *nmsg;
+-	asprintf(&nmsg,"PASS %s\r\n",m_Download->getDownloadUrl()->getPass().c_str());
++	int res;
++	res = asprintf(&nmsg,"PASS %s\r\n",m_Download->getDownloadUrl()->getPass().c_str());
+ 	logDebug("FTPSEND: '%s'\n",nmsg);
+ 	m_Socket->doRespond(nmsg,strlen(nmsg));
+ 	free(nmsg);
+@@ -393,6 +395,7 @@
+ 	uint32_t ip;
+ 	uint16_t minport;
+ 	uint16_t maxport;
++	int res;
+ 
+ 	if ( g_FTPDownloadHandler->getRetrAddress() == 0 )
+ 	{ // no NAT settings
+@@ -455,7 +458,7 @@
+ 	char *nmsg;
+ 	
+ 
+-	asprintf(&nmsg,"PORT %d,%d,%d,%d,%d,%d\r\n",
++	res = asprintf(&nmsg,"PORT %d,%d,%d,%d,%d,%d\r\n",
+ #if BYTE_ORDER == BIG_ENDIAN
+ 			(int32_t)(ip >> 24) & 0xff,
+ 			(int32_t)(ip >> 16) & 0xff,
+@@ -493,7 +496,8 @@
+ {
+ 	
+ 	char *nmsg;
+-	asprintf(&nmsg,"RETR %s\r\n",m_Download->getDownloadUrl()->getFile().c_str());
++	int res;
++	res = asprintf(&nmsg,"RETR %s\r\n",m_Download->getDownloadUrl()->getFile().c_str());
+ 	logDebug("FTPSEND: '%s'\n",nmsg);
+ 	m_Socket->doRespond(nmsg,strlen(nmsg));
+ 	free(nmsg);
+@@ -536,7 +540,8 @@
+ void CTRLDialogue::sendCWD()
+ {
+ 	char *nmsg;
+-	asprintf(&nmsg,"CWD %s\r\n",m_Download->getDownloadUrl()->getDir().c_str());
++	int res;
++	res = asprintf(&nmsg,"CWD %s\r\n",m_Download->getDownloadUrl()->getDir().c_str());
+ 	logDebug("FTPSEND: '%s'\n",nmsg);
+ 	m_Socket->doRespond(nmsg,strlen(nmsg));
+ 	free(nmsg);
+diff -urNad nepenthes-0.2.2~/modules/download-http/HTTPDialogue.cpp nepenthes-0.2.2/modules/download-http/HTTPDialogue.cpp
+--- nepenthes-0.2.2~/modules/download-http/HTTPDialogue.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/modules/download-http/HTTPDialogue.cpp	2008-07-16 21:43:26.000000000 +0100
+@@ -254,7 +254,8 @@
+ 	logPF();
+ 
+ 	char *request;
+-	asprintf(&request,
++	int res;
++	res = asprintf(&request,
+ 			 "GET /%s HTTP/1.0\r\n"
+ 			 "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n"
+ 			 "Accept: */*\r\n"
+diff -urNad nepenthes-0.2.2~/modules/module-honeytrap/PCAPSocket.cpp nepenthes-0.2.2/modules/module-honeytrap/PCAPSocket.cpp
+--- nepenthes-0.2.2~/modules/module-honeytrap/PCAPSocket.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/modules/module-honeytrap/PCAPSocket.cpp	2008-07-16 21:43:26.000000000 +0100
+@@ -182,7 +182,8 @@
+ 	string lhost = inet_ntoa(*(in_addr *)&m_LocalHost);
+ 
+ 	char *bpffilter;
+-	asprintf(&bpffilter,
++	int res;
++	res = asprintf(&bpffilter,
+ 			 "(src host %s and src port %i and dst host %s and dst port %i)"
+ 			 " or "
+ 			 "(src host %s and src port %i and dst host %s and dst port %i)",
+@@ -228,7 +229,7 @@
+ 
+ 	char *pcap_file_path;
+ 
+-	asprintf(&pcap_file_path,"%s/%i_%s-%i_%s-%i.pcap",
++	res = asprintf(&pcap_file_path,"%s/%i_%s-%i_%s-%i.pcap",
+ 			 g_ModuleHoneytrap->getPcapPath().c_str(),
+ 			 (int)time(NULL),
+ 			 rhost.c_str(),getRemotePort(),
+diff -urNad nepenthes-0.2.2~/modules/module-peiros/PeirosParser.cpp nepenthes-0.2.2/modules/module-peiros/PeirosParser.cpp
+--- nepenthes-0.2.2~/modules/module-peiros/PeirosParser.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/modules/module-peiros/PeirosParser.cpp	2008-07-16 21:43:25.000000000 +0100
+@@ -240,8 +240,9 @@
+ 	if(!request->appendedData.empty())
+ 	{
+ 		char * lengthHeader;
++		int res;
+ 		
+-		asprintf(&lengthHeader, "Content-length: %u\r\n", (int)request->appendedData.size());
++		res = asprintf(&lengthHeader, "Content-length: %u\r\n", (int)request->appendedData.size());
+ 		result += lengthHeader;
+ 		free(lengthHeader);
+ 	}
+diff -urNad nepenthes-0.2.2~/modules/shellcode-generic/sch_generic_connect_trans.cpp nepenthes-0.2.2/modules/shellcode-generic/sch_generic_connect_trans.cpp
+--- nepenthes-0.2.2~/modules/shellcode-generic/sch_generic_connect_trans.cpp	2006-05-04 11:25:40.000000000 +0100
++++ nepenthes-0.2.2/modules/shellcode-generic/sch_generic_connect_trans.cpp	2008-07-16 21:44:17.000000000 +0100
+@@ -179,7 +179,8 @@
+ 
+ 
+ 			char *url;
+-			asprintf(&url,"csend://%s:%d/%i",inet_ntoa(*(in_addr *)&host), port, (*it)->m_Offset);
++			int res;
++			res = asprintf(&url,"csend://%s:%d/%i",inet_ntoa(*(in_addr *)&host), port, (*it)->m_Offset);
+ 			g_Nepenthes->getDownloadMgr()->downloadUrl((*msg)->getLocalHost(),url, (*msg)->getRemoteHost(), url,0);
+ 			free(url);
+ 
+diff -urNad nepenthes-0.2.2~/modules/shellcode-generic/sch_generic_link_bind_trans.cpp nepenthes-0.2.2/modules/shellcode-generic/sch_generic_link_bind_trans.cpp
+--- nepenthes-0.2.2~/modules/shellcode-generic/sch_generic_link_bind_trans.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/modules/shellcode-generic/sch_generic_link_bind_trans.cpp	2008-07-16 21:49:36.000000000 +0100
+@@ -166,7 +166,8 @@
+ 		unsigned char *base64Key = g_Nepenthes->getUtilities()->b64encode_alloc(authKey,4);
+ 
+ 		uint32_t remoteHost = (*msg)->getRemoteHost();
+-		asprintf(&url,"blink://%s:%i/%s",inet_ntoa(*(in_addr *)&remoteHost),port,base64Key);
++		int res;
++		res = asprintf(&url,"blink://%s:%i/%s",inet_ntoa(*(in_addr *)&remoteHost),port,base64Key);
+ 		g_Nepenthes->getDownloadMgr()->downloadUrl((*msg)->getLocalHost(),url,(*msg)->getRemoteHost(),url,0);
+ 		free(url);
+ 		free(base64Key);
+diff -urNad nepenthes-0.2.2~/modules/shellcode-generic/sch_generic_link_trans.cpp nepenthes-0.2.2/modules/shellcode-generic/sch_generic_link_trans.cpp
+--- nepenthes-0.2.2~/modules/shellcode-generic/sch_generic_link_trans.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/modules/shellcode-generic/sch_generic_link_trans.cpp	2008-07-16 21:43:26.000000000 +0100
+@@ -161,8 +161,9 @@
+ 
+ 		char *url;
+ 		unsigned char *base64Key = g_Nepenthes->getUtilities()->b64encode_alloc(authKey,4);
++		int res;
+ 
+-		asprintf(&url,"link://%s:%i/%s",inet_ntoa(*(in_addr *)&address),port,base64Key);
++		res = asprintf(&url,"link://%s:%i/%s",inet_ntoa(*(in_addr *)&address),port,base64Key);
+ 		g_Nepenthes->getDownloadMgr()->downloadUrl((*msg)->getLocalHost(),url,(*msg)->getRemoteHost(),url,0);
+ 		free(url);
+ 		free(base64Key);
+diff -urNad nepenthes-0.2.2~/modules/shellcode-generic/sch_generic_stuttgart.cpp nepenthes-0.2.2/modules/shellcode-generic/sch_generic_stuttgart.cpp
+--- nepenthes-0.2.2~/modules/shellcode-generic/sch_generic_stuttgart.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/modules/shellcode-generic/sch_generic_stuttgart.cpp	2008-07-16 21:44:44.000000000 +0100
+@@ -156,8 +156,9 @@
+ 
+ 		char *url;
+ 		unsigned char *base64Key = g_Nepenthes->getUtilities()->b64encode_alloc(authKey,4);
++		int res;
+ 
+-		asprintf(&url,"link://%s:%i/%s",inet_ntoa(*(in_addr *)&address),port,base64Key);
++		res = asprintf(&url,"link://%s:%i/%s",inet_ntoa(*(in_addr *)&address),port,base64Key);
+ 		g_Nepenthes->getDownloadMgr()->downloadUrl((*msg)->getLocalHost(),url,(*msg)->getRemoteHost(),url,0);
+ 		free(url);
+ 		free(base64Key);
+diff -urNad nepenthes-0.2.2~/modules/shellcode-generic/sch_generic_wuerzburg.cpp nepenthes-0.2.2/modules/shellcode-generic/sch_generic_wuerzburg.cpp
+--- nepenthes-0.2.2~/modules/shellcode-generic/sch_generic_wuerzburg.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/modules/shellcode-generic/sch_generic_wuerzburg.cpp	2008-07-16 21:43:26.000000000 +0100
+@@ -151,8 +151,9 @@
+ 				inet_ntoa(*(in_addr *)&address), port);
+ 
+ 		char *url;
++		int res;
+ 
+-		asprintf(&url,"csend://%s:%d",inet_ntoa(*(in_addr *)&address), port);
++		res = asprintf(&url,"csend://%s:%d",inet_ntoa(*(in_addr *)&address), port);
+ 		g_Nepenthes->getDownloadMgr()->downloadUrl((*msg)->getLocalHost(),url, (*msg)->getRemoteHost(), url,0);
+ 		free(url);
+ 
+diff -urNad nepenthes-0.2.2~/modules/shellcode-signatures/sch_namespace_bindfiletransfer.cpp nepenthes-0.2.2/modules/shellcode-signatures/sch_namespace_bindfiletransfer.cpp
+--- nepenthes-0.2.2~/modules/shellcode-signatures/sch_namespace_bindfiletransfer.cpp	2006-04-08 19:40:17.000000000 +0100
++++ nepenthes-0.2.2/modules/shellcode-signatures/sch_namespace_bindfiletransfer.cpp	2008-07-16 21:50:22.000000000 +0100
+@@ -133,8 +133,9 @@
+ 
+ 			char *url;
+ 			unsigned char *base64Key = g_Nepenthes->getUtilities()->b64encode_alloc(authKey,4);
++			int res;
+ 
+-			asprintf(&url,"blink://%s:%i/%s",inet_ntoa(*(in_addr *)&host),port,base64Key);
++			res = asprintf(&url,"blink://%s:%i/%s",inet_ntoa(*(in_addr *)&host),port,base64Key);
+ 			g_Nepenthes->getDownloadMgr()->downloadUrl((*msg)->getLocalHost(),url,(*msg)->getRemoteHost(),url,0);
+ 			free(url);
+ 			free(base64Key);
+@@ -143,7 +144,8 @@
+ 			logInfo("%s -> %s:%u  \n",m_ShellcodeHandlerName.c_str(), inet_ntoa(*(in_addr *)&host), port);
+ 
+ 			char *url;
+-            asprintf(&url,"creceive://%s:%d/%i",inet_ntoa(*(in_addr *)&host), port, 0);
++			int res;
++            res = asprintf(&url,"creceive://%s:%d/%i",inet_ntoa(*(in_addr *)&host), port, 0);
+ 			g_Nepenthes->getDownloadMgr()->downloadUrl((*msg)->getLocalHost(),url, (*msg)->getRemoteHost(), url,0);
+ 			free(url);
+ 
+diff -urNad nepenthes-0.2.2~/modules/shellcode-signatures/sch_namespace_connectbackfiletransfer.cpp nepenthes-0.2.2/modules/shellcode-signatures/sch_namespace_connectbackfiletransfer.cpp
+--- nepenthes-0.2.2~/modules/shellcode-signatures/sch_namespace_connectbackfiletransfer.cpp	2006-04-08 19:40:18.000000000 +0100
++++ nepenthes-0.2.2/modules/shellcode-signatures/sch_namespace_connectbackfiletransfer.cpp	2008-07-16 21:47:42.000000000 +0100
+@@ -145,8 +145,9 @@
+ 
+ 			char *url;
+ 			unsigned char *base64Key = g_Nepenthes->getUtilities()->b64encode_alloc(authKey,4);
+-
+-			asprintf(&url,"link://%s:%i/%s",inet_ntoa(*(in_addr *)&host),port,base64Key);
++			int res;
++	
++			res = asprintf(&url,"link://%s:%i/%s",inet_ntoa(*(in_addr *)&host),port,base64Key);
+ 			g_Nepenthes->getDownloadMgr()->downloadUrl((*msg)->getLocalHost(),url,(*msg)->getRemoteHost(),url,0);
+ 			free(url);
+ 			free(base64Key);
+@@ -155,7 +156,9 @@
+ 			logInfo("%s -> %s:%u  \n",m_ShellcodeHandlerName.c_str(), inet_ntoa(*(in_addr *)&host), port);
+ 
+ 			char *url;
+-			asprintf(&url,"csend://%s:%d/%i",inet_ntoa(*(in_addr *)&host), port, 0);
++			int res;
++
++			res = asprintf(&url,"csend://%s:%d/%i",inet_ntoa(*(in_addr *)&host), port, 0);
+ 			g_Nepenthes->getDownloadMgr()->downloadUrl((*msg)->getLocalHost(),url, (*msg)->getRemoteHost(), url,0);
+ 			free(url);
+ 
+diff -urNad nepenthes-0.2.2~/modules/submit-gotek/submit-gotek.cpp nepenthes-0.2.2/modules/submit-gotek/submit-gotek.cpp
+--- nepenthes-0.2.2~/modules/submit-gotek/submit-gotek.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/modules/submit-gotek/submit-gotek.cpp	2008-07-16 21:48:10.000000000 +0100
+@@ -274,8 +274,9 @@
+ 	{		
+ 		{ // TODO substitute with clean std::string solution
+ 			char * temp;
++			int res;
+ 			
+-			asprintf(&temp, "sample-%u-%03u", (unsigned int) time(NULL), rand() % 1000);
++			res = asprintf(&temp, "sample-%u-%03u", (unsigned int) time(NULL), rand() % 1000);
+ 			fileName += temp;
+ 			free(temp);
+ 		}
+diff -urNad nepenthes-0.2.2~/modules/submit-postgres/PGDownloadContext.cpp nepenthes-0.2.2/modules/submit-postgres/PGDownloadContext.cpp
+--- nepenthes-0.2.2~/modules/submit-postgres/PGDownloadContext.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/modules/submit-postgres/PGDownloadContext.cpp	2008-07-16 21:53:22.000000000 +0100
+@@ -117,7 +117,8 @@
+ 	unsigned char *data = (unsigned char *)malloc(s.st_size);
+ 	memset(data,0,s.st_size);
+ 	FILE *f = fopen(path,"r");
+-	fread(data,1,s.st_size,f);
++	size_t nbytes;
++	nbytes = fread(data,1,s.st_size,f);
+ 	fclose(f);
+ 
+ 	Bencoding_Context *c = Bencoding_createContext();
+@@ -296,8 +297,9 @@
+ 	benc.append(m_FileContent);
+ 	benc += "e";
+ 
++	size_t nbytes;
+ 
+-	fwrite(benc.data(),1,benc.size(),f);
++	nbytes = fwrite(benc.data(),1,benc.size(),f);
+ 
+ 	fclose(f);
+ 	logDebug("Wrote bencoded spoolfile %s (%i bytes)\n",m_FilePath.c_str(),benc.size());
+diff -urNad nepenthes-0.2.2~/modules/vuln-ssh/SSHSocket.cpp nepenthes-0.2.2/modules/vuln-ssh/SSHSocket.cpp
+--- nepenthes-0.2.2~/modules/vuln-ssh/SSHSocket.cpp	2006-05-04 11:25:42.000000000 +0100
++++ nepenthes-0.2.2/modules/vuln-ssh/SSHSocket.cpp	2008-07-16 21:48:30.000000000 +0100
+@@ -272,7 +272,8 @@
+ 			ssh_message_channel_request_reply_success(message);
+ 
+ 			char *welcome;
+-			asprintf(&welcome,"Last login: Mon Jan 12 22:03:55 2005 from 212.54.21.23\n\...@nepenthes:~$ ",m_User.c_str());
++			int res;
++			res = asprintf(&welcome,"Last login: Mon Jan 12 22:03:55 2005 from 212.54.21.23\n\...@nepenthes:~$ ",m_User.c_str());
+ 			channel_write(m_Channel,(void *)welcome,strlen(welcome));
+ 			free(welcome);
+ 														
+diff -urNad nepenthes-0.2.2~/modules/x-6/x-6.cpp nepenthes-0.2.2/modules/x-6/x-6.cpp
+--- nepenthes-0.2.2~/modules/x-6/x-6.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/modules/x-6/x-6.cpp	2008-07-16 21:51:18.000000000 +0100
+@@ -304,7 +304,8 @@
+ 			printf("NUM %i\n",(int)i);
+ 			logSpam( "domain %s has ip %s \n",result->getDNS().c_str(),inet_ntoa(*(in_addr *)&*it));
+ 			char *reply;
+-			asprintf(&reply,"domain %s has A %s (context %08x)\n",result->getDNS().c_str(), inet_ntoa(*(in_addr *)&*it), (uint32_t)((intptr_t)result->getObject()));
++			int res;
++			res = asprintf(&reply,"domain %s has A %s (context %08x)\n",result->getDNS().c_str(), inet_ntoa(*(in_addr *)&*it), (uint32_t)((intptr_t)result->getObject()));
+ 			m_Socket->doRespond(reply,strlen(reply));
+ 			free(reply);
+ 
+@@ -341,7 +342,8 @@
+ 	{
+ 		logSpam("domain %s has no A, resolve error\n",result->getDNS().c_str());
+ 		char *reply;
+-		asprintf(&reply,"domain '%s' could not resolve A\n", result->getDNS().c_str());
++		int res;
++		res = asprintf(&reply,"domain '%s' could not resolve A\n", result->getDNS().c_str());
+ 		m_Socket->doRespond(reply,strlen(reply));
+ 		free(reply);
+ 	} else
+@@ -349,7 +351,8 @@
+ 	{
+ 		logSpam("domain %s has no TXT, resolve error\n",result->getDNS().c_str());
+ 		char *reply;
+-		asprintf(&reply,"domain '%s' could not resolve TXT\n", result->getDNS().c_str());
++		int res;
++		res = asprintf(&reply,"domain '%s' could not resolve TXT\n", result->getDNS().c_str());
+ 		m_Socket->doRespond(reply,strlen(reply));
+ 		free(reply);
+ 	}
+diff -urNad nepenthes-0.2.2~/nepenthes-core/src/Config.cpp nepenthes-0.2.2/nepenthes-core/src/Config.cpp
+--- nepenthes-0.2.2~/nepenthes-core/src/Config.cpp	2008-07-16 20:17:20.000000000 +0100
++++ nepenthes-0.2.2/nepenthes-core/src/Config.cpp	2008-07-16 21:36:38.000000000 +0100
+@@ -142,6 +142,7 @@
+ 
+ void Config::load(const char *filename)
+ {
++
+ #ifdef WIN32
+ 	struct			_stat file;
+ #else
+@@ -159,7 +160,7 @@
+ 
+ 	data = (unsigned char *)malloc(file.st_size);
+ 	FILE *f = fopen(filename,"rb");
+-	fread(data,1,file.st_size,f);
++	size_t nbytes = fread(data,1,file.st_size,f);
+ 	fclose(f);
+ 
+ #else
+diff -urNad nepenthes-0.2.2~/nepenthes-core/src/DownloadManager.cpp nepenthes-0.2.2/nepenthes-core/src/DownloadManager.cpp
+--- nepenthes-0.2.2~/nepenthes-core/src/DownloadManager.cpp	2008-07-16 20:17:20.000000000 +0100
++++ nepenthes-0.2.2/nepenthes-core/src/DownloadManager.cpp	2008-07-16 21:36:38.000000000 +0100
+@@ -333,6 +333,7 @@
+ 
+ 		if ( bReplaceHost )
+ 		{
++			int res;
+ 			string sUrl =   down->getDownloadUrl()->getProtocol();
+ 			sUrl += "://";
+ 
+@@ -342,7 +343,7 @@
+ 			logInfo("Replaced Address, new URL is %s \n",sUrl.c_str());
+ 
+ 			char *port;
+-			asprintf(&port,":%i/",down->getDownloadUrl()->getPort());
++			res = asprintf(&port,":%i/",down->getDownloadUrl()->getPort());
+ 			sUrl += port;
+ 			free(port);
+ 
+diff -urNad nepenthes-0.2.2~/nepenthes-core/src/LogManager.cpp nepenthes-0.2.2/nepenthes-core/src/LogManager.cpp
+--- nepenthes-0.2.2~/nepenthes-core/src/LogManager.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/nepenthes-core/src/LogManager.cpp	2008-07-16 21:36:38.000000000 +0100
+@@ -170,6 +170,7 @@
+ void LogManager::logf(uint32_t mask, const char *format, ...)
+ {
+ 	va_list		ap;
++	int res;
+ 
+ 
+ 	va_start(ap, format);
+@@ -186,7 +187,7 @@
+ 	va_end(ap);
+ #else
+ 	char		*message;
+-	vasprintf(&message, format, ap);
++	res = vasprintf(&message, format, ap);
+ 	va_end(ap);
+ 
+ 	log(mask, message);
+diff -urNad nepenthes-0.2.2~/nepenthes-core/src/Nepenthes.cpp nepenthes-0.2.2/nepenthes-core/src/Nepenthes.cpp
+--- nepenthes-0.2.2~/nepenthes-core/src/Nepenthes.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/nepenthes-core/src/Nepenthes.cpp	2008-07-16 21:36:38.000000000 +0100
+@@ -516,8 +516,9 @@
+ 
+ 	if (opt.m_daemonize == true)
+ 	{
++		int res;
+ 		logInfo("running as daemon\n");
+-		daemon(1,0);
++		res = daemon(1,0);
+ 		logInfo("daemon process id is %i\n",getpid());
+ 	}
+ 
+@@ -817,7 +818,8 @@
+ 			return -1;
+ 		} else
+ 		{
+-			fread(buffer,1,filesize,f);
++			size_t nbytes;
++			nbytes = fread(buffer,1,filesize,f);
+ 			fclose(f);
+ 
+ 			uint32_t i;
+diff -urNad nepenthes-0.2.2~/nepenthes-core/src/RingFileLogger.cpp nepenthes-0.2.2/nepenthes-core/src/RingFileLogger.cpp
+--- nepenthes-0.2.2~/nepenthes-core/src/RingFileLogger.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/nepenthes-core/src/RingFileLogger.cpp	2008-07-16 21:36:38.000000000 +0100
+@@ -79,6 +79,8 @@
+ 
+ void RingFileLogger::setLogFileFormat(char *fmt)
+ {
++	int res;
++
+ 	if (m_FileFormat != NULL)
+ 	{
+ 		free(m_FileFormat);
+@@ -90,7 +92,7 @@
+ 	{
+ 		free(m_FirstFile);
+ 	}
+-	asprintf(&m_FirstFile, m_FileFormat, 0);
++	res = asprintf(&m_FirstFile, m_FileFormat, 0);
+ }
+ 
+ void RingFileLogger::setMaxFiles(uint8_t count)
+diff -urNad nepenthes-0.2.2~/nepenthes-core/src/Utilities.cpp nepenthes-0.2.2/nepenthes-core/src/Utilities.cpp
+--- nepenthes-0.2.2~/nepenthes-core/src/Utilities.cpp	2008-07-16 21:36:38.000000000 +0100
++++ nepenthes-0.2.2/nepenthes-core/src/Utilities.cpp	2008-07-16 21:36:38.000000000 +0100
+@@ -370,7 +370,8 @@
+ 
+ 	if( (f = fopen(md5.c_str(), "wb")) )
+ 	{
+-		fwrite((const void *)data, len, 1, f);
++		size_t nbytes;
++		nbytes = fwrite((const void *)data, len, 1, f);
+ 		fclose(f);
+ 
+ 		g_Nepenthes->getLogMgr()->logf(mask,"Stored Hexdump %s (0x%08x , 0x%08x).\n", md5.c_str(), (uint32_t)((intptr_t)data), len);

Attachment: signature.asc
Description: This is a digitally signed message part



Reply via email to