From 433d13112fdab1049e31d86d740a8b6532e3ec79 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sat, 10 Mar 2018 10:17:21 -0800 Subject: [PATCH] Removes compiler warnings in morph.c https://bugs.freedesktop.org/show_bug.cgi?id=105429 --- libfprint/nbis/mindtct/morph.c | 46 +++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/libfprint/nbis/mindtct/morph.c b/libfprint/nbis/mindtct/morph.c index b6be74f..2cdf45e 100644 --- a/libfprint/nbis/mindtct/morph.c +++ b/libfprint/nbis/mindtct/morph.c @@ -1,15 +1,15 @@ /******************************************************************************* -License: -This software was developed at the National Institute of Standards and -Technology (NIST) by employees of the Federal Government in the course -of their official duties. Pursuant to title 17 Section 105 of the -United States Code, this software is not subject to copyright protection -and is in the public domain. NIST assumes no responsibility whatsoever for -its use by other parties, and makes no guarantees, expressed or implied, -about its quality, reliability, or any other characteristic. - -Disclaimer: +License: +This software was developed at the National Institute of Standards and +Technology (NIST) by employees of the Federal Government in the course +of their official duties. Pursuant to title 17 Section 105 of the +United States Code, this software is not subject to copyright protection +and is in the public domain. NIST assumes no responsibility whatsoever for +its use by other parties, and makes no guarantees, expressed or implied, +about its quality, reliability, or any other characteristic. + +Disclaimer: This software was developed to promote biometric standards and biometric technology testing for the Federal Government in accordance with the USA PATRIOT Act and the Enhanced Border Security and Visa Entry Reform Act. @@ -17,7 +17,7 @@ Specific hardware and software products identified in this software were used in order to perform the software development. In no case does such identification imply recommendation or endorsement by the National Institute of Standards and Technology, nor does it imply that the products and equipment -identified are necessarily the best available for the purpose. +identified are necessarily the best available for the purpose. *******************************************************************************/ @@ -69,13 +69,13 @@ void erode_charimage_2(unsigned char *inp, unsigned char *out, { int row, col; unsigned char *itr = inp, *otr = out; - + memcpy(out, inp, iw*ih); - + /* for true pixels. kill pixel if there is at least one false neighbor */ for ( row = 0 ; row < ih ; row++ ) for ( col = 0 ; col < iw ; col++ ) - { + { if (*itr) /* erode only operates on true pixels */ { /* more efficient with C's left to right evaluation of */ @@ -87,7 +87,7 @@ void erode_charimage_2(unsigned char *inp, unsigned char *out, *otr = 0; } itr++ ; otr++; - } + } } /************************************************************************* @@ -109,13 +109,13 @@ void dilate_charimage_2(unsigned char *inp, unsigned char *out, { int row, col; unsigned char *itr = inp, *otr = out; - + memcpy(out, inp, iw*ih); - + /* for all pixels. set pixel if there is at least one true neighbor */ for ( row = 0 ; row < ih ; row++ ) for ( col = 0 ; col < iw ; col++ ) - { + { if (!*itr) /* pixel is already true, neighbors irrelevant */ { /* more efficient with C's left to right evaluation of */ @@ -127,7 +127,7 @@ void dilate_charimage_2(unsigned char *inp, unsigned char *out, *otr = 1; } itr++ ; otr++; - } + } } /************************************************************************* @@ -151,7 +151,7 @@ char get_south8_2(char *ptr, const int row, const int iw, const int ih, { if (row >= ih-1) /* catch case where image is undefined southwards */ return failcode; /* use plane geometry and return code. */ - + else return *(ptr+iw); } @@ -175,7 +175,7 @@ char get_north8_2(char *ptr, const int row, const int iw, { if (row < 1) /* catch case where image is undefined northwards */ return failcode; /* use plane geometry and return code. */ - + else return *(ptr-iw); } @@ -199,7 +199,7 @@ char get_east8_2(char *ptr, const int col, const int iw, { if (col >= iw-1) /* catch case where image is undefined eastwards */ return failcode; /* use plane geometry and return code. */ - + else return *(ptr+ 1); } @@ -221,6 +221,6 @@ char get_west8_2(char *ptr, const int col, const int failcode) { if (col < 1) /* catch case where image is undefined westwards */ return failcode; /* use plane geometry and return code. */ - + else return *(ptr- 1); } -- 2.14.3