diff --git a/sm5/ataprint.c b/sm5/ataprint.c
index 44407a06d986df737a2a010e2e45036a4828d7a0..1ddf45baa1dd9bdb39958268b108e477a429336f 100644
--- a/sm5/ataprint.c
+++ b/sm5/ataprint.c
@@ -29,7 +29,7 @@
 #include "smartctl.h"
 #include "extern.h"
 
-const char *CVSid2="$Id: ataprint.c,v 1.36 2002/10/29 10:06:20 ballen4705 Exp $"
+const char *CVSid2="$Id: ataprint.c,v 1.37 2002/10/29 22:09:52 ballen4705 Exp $"
 CVSID1 CVSID2 CVSID3 CVSID6;
 
 // for passing global control variables
@@ -434,17 +434,26 @@ void PrintSmartAttribWithThres (struct ata_smart_values data,
 	
 	// Temperature
       case 194:
-	pout ("%u", disk->raw[0]);
+	pout ("%hhu", disk->raw[0]);
 	if (rawvalue==disk->raw[0])
 	  pout("\n");
 	else
 	  // The other bytes are in use. Try IBM's model
-	  pout(" (Lifetime Min/Max %u/%u)\n",disk->raw[2],
+	  pout(" (Lifetime Min/Max %hhu/%hhu)\n",disk->raw[2],
 		 disk->raw[4]);
 	break;
       default:
 	pout("%llu\n", rawvalue);
-      }	    
+      }
+      
+      // print a warning if there is inconsistency here!
+      if (disk->id != thre->id){
+	char atdat[64],atthr[64];
+	ataPrintSmartAttribName(atdat,disk->id);
+	ataPrintSmartAttribName(atthr,thre->id);
+	pout("%-28s<== Data Page      |  WARNING: PREVIOUS ATTRIBUTE HAS TWO\n",atdat);
+	pout("%-28s<== Threshold Page |  INCONSISTENT IDENTITIES IN THE DATA\n",atthr);
+      }
     }
   }
   if (!needheader) pout("\n");
diff --git a/sm5/ataprint.cpp b/sm5/ataprint.cpp
index 15cde024f29be90e467e973d38edbf5e8f73c73d..b2b9e1611d2c0e5c1ddcaf314639cbe14885675b 100644
--- a/sm5/ataprint.cpp
+++ b/sm5/ataprint.cpp
@@ -29,7 +29,7 @@
 #include "smartctl.h"
 #include "extern.h"
 
-const char *CVSid2="$Id: ataprint.cpp,v 1.36 2002/10/29 10:06:20 ballen4705 Exp $"
+const char *CVSid2="$Id: ataprint.cpp,v 1.37 2002/10/29 22:09:52 ballen4705 Exp $"
 CVSID1 CVSID2 CVSID3 CVSID6;
 
 // for passing global control variables
@@ -434,17 +434,26 @@ void PrintSmartAttribWithThres (struct ata_smart_values data,
 	
 	// Temperature
       case 194:
-	pout ("%u", disk->raw[0]);
+	pout ("%hhu", disk->raw[0]);
 	if (rawvalue==disk->raw[0])
 	  pout("\n");
 	else
 	  // The other bytes are in use. Try IBM's model
-	  pout(" (Lifetime Min/Max %u/%u)\n",disk->raw[2],
+	  pout(" (Lifetime Min/Max %hhu/%hhu)\n",disk->raw[2],
 		 disk->raw[4]);
 	break;
       default:
 	pout("%llu\n", rawvalue);
-      }	    
+      }
+      
+      // print a warning if there is inconsistency here!
+      if (disk->id != thre->id){
+	char atdat[64],atthr[64];
+	ataPrintSmartAttribName(atdat,disk->id);
+	ataPrintSmartAttribName(atthr,thre->id);
+	pout("%-28s<== Data Page      |  WARNING: PREVIOUS ATTRIBUTE HAS TWO\n",atdat);
+	pout("%-28s<== Threshold Page |  INCONSISTENT IDENTITIES IN THE DATA\n",atthr);
+      }
     }
   }
   if (!needheader) pout("\n");