[segyio] 181/376: ebcdic-ascii conversion casts to silence warning

Jørgen Kvalsvik jokva-guest at moszumanska.debian.org
Wed Sep 20 08:04:29 UTC 2017


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

jokva-guest pushed a commit to branch debian
in repository segyio.

commit dbdb9d1ee1293f9c2e2aac96733ac359c5306cb0
Author: Jørgen Kvalsvik <jokva at statoil.com>
Date:   Fri Feb 10 12:07:27 2017 +0100

    ebcdic-ascii conversion casts to silence warning
    
    The standard only specifies 128 different symbols in the ascii table,
    meaning a well-defined textual header only need (signed) char.
---
 lib/src/segy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/src/segy.c b/lib/src/segy.c
index 11cf760..8283a0c 100644
--- a/lib/src/segy.c
+++ b/lib/src/segy.c
@@ -65,14 +65,14 @@ static unsigned char e2a[256] = {
 
 void ebcdic2ascii( const char* ebcdic, char* ascii ) {
     while( *ebcdic != '\0' )
-        *ascii++ = e2a[ (unsigned char) *ebcdic++ ];
+        *ascii++ = (char)e2a[ (unsigned char) *ebcdic++ ];
 
     *ascii = '\0';
 }
 
 void ascii2ebcdic( const char* ascii, char* ebcdic ) {
     while (*ascii != '\0')
-        *ebcdic++ = a2e[(unsigned char) *ascii++];
+        *ebcdic++ = (char)a2e[(unsigned char) *ascii++];
 
     *ebcdic = '\0';
 }

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



More information about the debian-science-commits mailing list