[libfann] 153/242: Removed some compile warnings in visual c++

Christian Kastner chrisk-guest at moszumanska.debian.org
Sat Oct 4 21:10:36 UTC 2014


This is an automated email from the git hooks/post-receive script.

chrisk-guest pushed a commit to tag Version2_0_0
in repository libfann.

commit 8817c0d006e0e81cf2cddf166959f3aaf197c29c
Author: Steffen Nissen <lukesky at diku.dk>
Date:   Tue Jul 6 16:51:18 2004 +0000

    Removed some compile warnings in visual c++
---
 src/fann_error.c            | 13 +++++++------
 src/include/fann_internal.h |  2 +-
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/fann_error.c b/src/fann_error.c
index 766c69d..7dd7704 100644
--- a/src/fann_error.c
+++ b/src/fann_error.c
@@ -24,6 +24,7 @@
 
 #include "config.h"
 #include "fann.h"
+#include "fann_internal.h"
 #include "fann_errno.h"
 
 #ifdef _MSC_VER
@@ -84,12 +85,12 @@ FANN_EXTERNAL void FANN_API fann_print_error(struct fann_error *errdat) {
 /* INTERNAL FUNCTION
    Populate the error information
  */
-void fann_error(struct fann_error *errdat, const unsigned int errno, ...)
+void fann_error(struct fann_error *errdat, const unsigned int errno_f, ...)
 {
 	va_list ap;
 	char * errstr;
 
-	if (errdat != NULL) errdat->errno_f = errno;
+	if (errdat != NULL) errdat->errno_f = errno_f;
 	
 	if(errdat != NULL && errdat->errstr != NULL){
 		errstr = errdat->errstr;
@@ -101,8 +102,8 @@ void fann_error(struct fann_error *errdat, const unsigned int errno, ...)
 		}
 	}
 
-	va_start(ap, errno);
-	switch ( errno ) {
+	va_start(ap, errno_f);
+	switch ( errno_f ) {
 	case FANN_E_NO_ERROR:
 		break;
 	case FANN_E_CANT_OPEN_CONFIG_R:
@@ -154,11 +155,11 @@ void fann_error(struct fann_error *errdat, const unsigned int errno, ...)
 	va_end(ap);
 
 	if ( errdat == NULL ) {
-		fprintf(stderr, "FANN Error %d: %s", errno, errstr);
+		fprintf(stderr, "FANN Error %d: %s", errno_f, errstr);
 	} else {
 		errdat->errstr = errstr;
 		if ( errdat->error_log != NULL ) {
-			fprintf(errdat->error_log, "FANN Error %d: %s", errno, errstr);
+			fprintf(errdat->error_log, "FANN Error %d: %s", errno_f, errstr);
 		}
 	}
 }
diff --git a/src/include/fann_internal.h b/src/include/fann_internal.h
index c9eb5f5..55cb602 100644
--- a/src/include/fann_internal.h
+++ b/src/include/fann_internal.h
@@ -50,7 +50,7 @@ void fann_seed_rand();
 void fann_update_stepwise_hidden(struct fann *ann);
 void fann_update_stepwise_output(struct fann *ann);
 
-void fann_error(struct fann_error *errdat, const unsigned int errno, ...);
+void fann_error(struct fann_error *errdat, const unsigned int errno_f, ...);
 void fann_init_error_data(struct fann_error *errdat);
 
 struct fann * fann_create_from_fd(FILE *conf, const char *configuration_file);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libfann.git



More information about the debian-science-commits mailing list