[Snort-devel] Patch to silence a compiler warning in the database plugin

Nick Zitzmann seiryu at ...2251...
Wed Jan 28 02:09:45 EST 2004

Just downloaded the latest source from CVS. When compiling with ODBC 
enabled, I noticed the following compiler warning (from GCC 3.3):

spo_database.c: In function `Insert':
spo_database.c:2082: warning: suggest explicit braces to avoid 
ambiguous `else'

 From reading the code, it appears that it's trying to call three ODBC 
functions at that point, and then run a block of code in case an error 
occurred. But the "else" statement is ambiguous, and might only be 
reached if the third function (instead of any function) returned an 
error. In this patch, I changed this so the "else" statement (which 
handles ODBC errors) is reached if any of the three functions returned 
an error.


Nick Zitzmann
S/MIME signature available upon request

UNIX: Where /sbin/init is Job #1.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spo_database.c.patch
Type: application/text
Size: 2902 bytes
Desc: not available
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20040128/9b82a190/attachment.bin>

More information about the Snort-devel mailing list