diff Meerwald/wm_bruyn_e.c @ 20:bd669312f068

suppress warnings, fix link errors
author Peter Meerwald-Stadler <pmeerw@pmeerw.net>
date Sat, 28 Jan 2023 23:54:58 +0100
parents 4987db85cfae
children
line wrap: on
line diff
--- a/Meerwald/wm_bruyn_e.c	Tue Sep 21 13:40:51 2010 +0200
+++ b/Meerwald/wm_bruyn_e.c	Sat Jan 28 23:54:58 2023 +0100
@@ -41,7 +41,7 @@
   int c;
   int i, j;
   int n;
-  int col, row;
+  int row;
   int n_block;
   int skipping = 0;
 
@@ -68,7 +68,7 @@
   // parse command line and set options
   while ((c = getopt(argc, argv, "b:h?n:o:p:P:q:s:t:T:v:k")) != EOF) {
     switch (c) {
-      case 'k':  
+      case 'k':
         skipping = 1;
         break;
       case 'h':
@@ -196,8 +196,7 @@
         fscanf(sig, "%*d\n");
       fscanf(sig, "%d\n", &seed);
       srandom(seed);
-      n_signature = NBITSTOBYTES(nbit_signature);
-      fread(signature, sizeof(char), n_signature, sig);
+      fread(signature, sizeof(char), NBITSTOBYTES(nbit_signature), sig);
       fscanf(sig, "\n");
     }
     else {
@@ -242,7 +241,6 @@
   fclose(in);
 
   row = 0;
-  col = 0;
 
   // allocate memory for one block
   block = alloc_grays(blocksize, blocksize);
@@ -254,7 +252,7 @@
   category1 = alloc_grays(blocksize, blocksize);
   category2 = alloc_grays(blocksize, blocksize);
 
-  // set up category classification array according to 
+  // set up category classification array according to
   // pattern type parameter
   for (i = 0; i < blocksize; i++)
     for (j = 0; j < blocksize; j++) {
@@ -286,7 +284,7 @@
     } while (add_coord(coords, xb, yb) < 0);
 
     // copy image block
-    copy_grays_to_block(block, image, xb * blocksize, yb * blocksize, blocksize, blocksize);    
+    copy_grays_to_block(block, image, xb * blocksize, yb * blocksize, blocksize, blocksize);
 
     if (verbose > 0)
       fprintf(stderr, "embedding bit #%d (= %d) in block at (%d/%d)\n", n, get_signature_bit(n), xb * blocksize, yb * blocksize);

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.