This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] fix 11 ARI in p-typeprint.c
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Wed, 26 Sep 2007 17:40:14 +0200
- Subject: [PATCH] fix 11 ARI in p-typeprint.c
More ARI fixes...
Pierre Muller
ChangeLog entry:
2007-09-26 Pierre Muller <muller@ics.u-strasbg.fr>
* p-typeprint.c: Fix 11 ARI reported problems.
(pascal_print_type): Fix 4 operator at end of line.
(pascal_type_print_method_args) : Replace 2 DEPRECATED_STREQN macros
using strncmp function.
(pascal_type_print_base): Fix 2 operator at end of line.
(pascal_type_print_base) : Replace 3 DEPRECATED_STREQN macros
using strncmp function.
$ cvs diff -r 1.19 p-typeprint.c
Index: p-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/p-typeprint.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -r1.19 -r1.20
59,60c59,60
< if ((code == TYPE_CODE_FUNC ||
< code == TYPE_CODE_METHOD))
---
> if ((code == TYPE_CODE_FUNC
> || code == TYPE_CODE_METHOD))
67,69c67,69
< if ((varstring != NULL && *varstring != '\0') &&
< !(code == TYPE_CODE_FUNC ||
< code == TYPE_CODE_METHOD))
---
> if ((varstring != NULL && *varstring != '\0')
> && !(code == TYPE_CODE_FUNC
> || code == TYPE_CODE_METHOD))
74,75c74,75
< if (!(code == TYPE_CODE_FUNC ||
< code == TYPE_CODE_METHOD))
---
> if (!(code == TYPE_CODE_FUNC
> || code == TYPE_CODE_METHOD))
140,141c140,141
< int is_constructor = DEPRECATED_STREQN (physname, "__ct__", 6);
< int is_destructor = DEPRECATED_STREQN (physname, "__dt__", 6);
---
> int is_constructor = (strncmp (physname, "__ct__", 6) == 0);
> int is_destructor = (strncmp (physname, "__dt__", 6) == 0);
540c540
< if (DEPRECATED_STREQN (TYPE_FIELD_NAME (type, i), "_vptr", 5)
---
> if ((strncmp (TYPE_FIELD_NAME (type, i), "_vptr", 5) == 0)
618,619c618,619
< int is_constructor = DEPRECATED_STREQN (physname,
"__ct__", 6);
< int is_destructor = DEPRECATED_STREQN (physname, "__dt__",
6);
---
> int is_constructor = (strncmp (physname, "__ct__", 6) ==
0);
> int is_destructor = (strncmp (physname, "__dt__", 6) ==
0);
667,668c667,669
< else if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) != 0
&&
< TYPE_CODE (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE
(f, j))) != TYPE_CODE_VOID)
---
> else if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) != 0
> && TYPE_CODE (TYPE_TARGET_TYPE (
> TYPE_FN_FIELD_TYPE (f, j))) !=
TYPE_CODE_VOID)
682,683c683,685
< if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) != 0 &&
< TYPE_CODE (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f,
j))) != TYPE_CODE_VOID)
---
> if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) != 0
> && TYPE_CODE (TYPE_TARGET_TYPE (
> TYPE_FN_FIELD_TYPE (f, j))) != TYPE_CODE_VOID)