[dvblast-devel] tiny bug on platform where char is unsigned

HoP jpetrous at gmail.com
Mon Oct 19 00:56:14 CEST 2009


Hi,

just started with dvblast. Because of using embedded hardware
(arm-based cpu) I have immediatelly discovered tiny bug.

On platform where "char" is unsigned by default, getopt()
ends up with usage() every time because of unsigned casting:

+++ dvblast.c   2009-10-19 00:40:58.000000000 +0200
--- dvblast.c~  2009-10-19 00:40:12.000000000 +0200
@@ -203,7 +203,7 @@

     for ( ; ; )
     {
+        signed char c;
-        char c;

         if ( (c = getopt(i_argc, pp_argv,
"c:r:t:o:i:a:f:s:v:pb:m:ud:h")) == -1 )
             break;


Regards

/Honza


More information about the dvblast-devel mailing list