[PATCH 09/13] format-check: remove printf_fmt_print_pointer()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is currently not needed, so remove it.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 verify-format.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/verify-format.c b/verify-format.c
index cd55a49e0676..34c3db96fe3a 100644
--- a/verify-format.c
+++ b/verify-format.c
@@ -201,22 +201,6 @@ static int printf_fmt_pointer(struct format_type *fmt,
 	return !(*typediff = check_printf_pointer(fmt, ctype));
 }
 
-static int printf_fmt_print_pointer(struct format_type *fmt,
-				    struct expression **expr,
-				    struct symbol *ctype,
-				    const char **typediff)
-{
-	// TODO TODO: fix this here!!!
-	int ret;
-	ret = check_assignment_types(fmt->type, expr, typediff);
-	if (ret == 0) {
-		/* if just printing, ignore address-space mismatches */
-		if (strcmp(*typediff, "different address spaces") == 0)
-			ret = 1;
-	}
-	return ret;
-}
-
 static struct format_type printf_fmt_ptr_ref = {
 	.format = "p",
 	.test = printf_fmt_pointer,
@@ -367,7 +351,7 @@ static struct format_type *parse_printf_get_fmt(struct format_type *type,
 		}
 		break;
 	case 'p':
-		type->test = printf_fmt_print_pointer;
+		type->test = printf_fmt_pointer;
 		type->type = &const_ptr_ctype;
 		/* check for pointer being printed as hex explicitly */
 		if (*ptr == 'x' || *ptr == 'X') {
@@ -375,7 +359,6 @@ static struct format_type *parse_printf_get_fmt(struct format_type *type,
 		} else if (isalpha(*ptr)) {
 			/* probably some extra specifiers after %p */
 			ptr++;
-			type->test = printf_fmt_pointer;
 		}
 		break;
 	case 'n':
-- 
2.28.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux