[m-rev.] diff: delete an unused function

Julien Fischer jfischer at opturion.com
Sun Jun 6 18:46:49 AEST 2021


Delete an unused function.

runtime/mercury_bitmap.c:
      Delete the function Mr_hex_char_to_int().  It has been unused
      since 2011.  (Actually, it was unused before then since
      it's only caller was also unused.)

Julien.

diff --git a/runtime/mercury_bitmap.c b/runtime/mercury_bitmap.c
index 9a85355..bbf663d 100644
--- a/runtime/mercury_bitmap.c
+++ b/runtime/mercury_bitmap.c
@@ -11,7 +11,6 @@

  #include <stdio.h>

-static int MR_hex_char_to_int(char digit);
  static MR_String MR_do_bitmap_to_string(MR_ConstBitmapPtr, MR_bool, MR_bool,
      MR_AllocSiteInfoPtr);

@@ -40,30 +39,6 @@ static const char hex_digits[] =
      {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
      'A', 'B', 'C', 'D', 'E', 'F'};

-static int
-MR_hex_char_to_int(char digit)
-{
-    switch (digit) {
-        case '0': return 0;
-        case '1': return 1;
-        case '2': return 2;
-        case '3': return 3;
-        case '4': return 4;
-        case '5': return 5;
-        case '6': return 6;
-        case '7': return 7;
-        case '8': return 8;
-        case '9': return 9;
-        case 'A': return 10;
-        case 'B': return 11;
-        case 'C': return 12;
-        case 'D': return 13;
-        case 'E': return 14;
-        case 'F': return 15;
-        default : return -1;
-    }
-}
-
  MR_String
  MR_bitmap_to_quoted_string_saved_hp(MR_ConstBitmapPtr b,
      MR_AllocSiteInfoPtr alloc_id)


More information about the reviews mailing list