]> Creatis software - gdcm.git/commitdiff
COMP: Fixing some warnings
authormalaterre <malaterre>
Wed, 8 Jun 2005 17:22:37 +0000 (17:22 +0000)
committermalaterre <malaterre>
Wed, 8 Jun 2005 17:22:37 +0000 (17:22 +0000)
src/gdcmjpegls/Decoder/bitio.c
src/gdcmjpegls/Decoder/global.c

index 13d9f4596167ae360c8bb002ff884caf9846a7cd..7ced3d2c3498265ed7492c4b34e993dfc7a94c27 100644 (file)
@@ -51,6 +51,7 @@
 
 #include "global.h"
 #include "bitio.h"
+#include <string.h> // for memset
 
 
 extern int zeroLUT[];     /* lookup table to find number of leading zeroes */
index 533e065925512978dcb21480eb8bf54d8ffe83de..23105739183f27bb6331cfe22e3125564d8cc088 100644 (file)
@@ -332,29 +332,29 @@ char *ttyfilename = "CON";
 
 void fprint_disclaimer(FILE *fp, int nopause)
 {
-    char *p0, *p1;
-    FILE *ttyf;
-    int  i, c;
+  char *p0, *p1;
+  FILE *ttyf;
+  int  i; /*, c;*/
 
-    nopause = nopause | !isatty(fileno(fp));
+  nopause = nopause | !isatty(fileno(fp));
 
-    if ( !nopause && (ttyf=fopen(ttyfilename,"r"))==NULL ) {
-  nopause = 1;
-    }
+  if ( !nopause && (ttyf=fopen(ttyfilename,"r"))==NULL ) {
+    nopause = 1;
+  }
 
-    for ( i=1, p0=disclaimer; ; i++ ) {
-  if ( !(*p0)  ) break;
-  if ( !nopause && i%PAUSE==0 ) {
+  for ( i=1, p0=disclaimer; ; i++ ) {
+    if ( !(*p0)  ) break;
+    if ( !nopause && i%PAUSE==0 ) {
       fflush(fp);
       fprintf(stderr, "--- (press RETURN to continue) ---"); 
       fflush(stderr);
-      c = getc(ttyf);
-  }
-  for ( p1=p0; (*p1 != '\n') && (*p1 != 0); p1++ );
-  *p1 = 0;
-  fprintf(fp,"%s\n",p0);
-  p0 = p1+1;
+/*      c = getc(ttyf);*/
     }
-    fprintf(fp,"\n"); fflush(fp);
-    if ( !nopause) fclose(ttyf);
+    for ( p1=p0; (*p1 != '\n') && (*p1 != 0); p1++ );
+    *p1 = 0;
+    fprintf(fp,"%s\n",p0);
+    p0 = p1+1;
+  }
+  fprintf(fp,"\n"); fflush(fp);
+  if ( !nopause) fclose(ttyf);
 }