[Forensics-changes] [yara] 05/368: Fix warning "not all control paths return a value" when compiling with Visual Studio
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:30:04 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.5.0
in repository yara.
commit 9aa11cbb0ceee953666fa0f61c6b6d512d3b851c
Author: Victor M. Alvarez <plusvic at gmail.com>
Date: Mon Jun 29 10:20:04 2015 +0200
Fix warning "not all control paths return a value" when compiling with Visual Studio
---
libyara/exception.h | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/libyara/exception.h b/libyara/exception.h
index 48d4c63..5c8b54a 100644
--- a/libyara/exception.h
+++ b/libyara/exception.h
@@ -30,22 +30,19 @@ jmp_buf *exc_jmp_buf[MAX_THREADS];
static LONG CALLBACK exception_handler(
PEXCEPTION_POINTERS ExceptionInfo)
{
+ int tidx = yr_get_tidx();
+
switch(ExceptionInfo->ExceptionRecord->ExceptionCode)
{
case EXCEPTION_IN_PAGE_ERROR:
case EXCEPTION_ACCESS_VIOLATION:
- break;
- default:
- return EXCEPTION_CONTINUE_SEARCH;
+ if (tidx != -1 && exc_jmp_buf[tidx] != NULL)
+ longjmp(*exc_jmp_buf[tidx], 1);
+ else
+ abort();
}
- int tidx = yr_get_tidx();
-
- if (tidx != -1 && exc_jmp_buf[tidx] != NULL)
- longjmp(*exc_jmp_buf[tidx], 1);
-
- // We should not reach this point.
- abort();
+ return EXCEPTION_CONTINUE_SEARCH;
}
#define YR_TRYCATCH(_try_clause_, _catch_clause_) \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list