mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-24 18:54:52 +00:00
Fixed printf format errors. gcc should have a macro HOST_PTR_PRINTF_TYPE
to go with its HOST_PTR_PRINTF[_FORMAT], since if %p is wrong for the format then `void *' is probably wrong for the type.
This commit is contained in:
parent
92f896a9cc
commit
d983fa4305
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38021
|
@ -23,10 +23,8 @@ Boston, MA 02111-1307, USA. */
|
|||
instead $xm_file should be CPU/xm-freebsd.h, which should include both
|
||||
CPU/xm-CPU.h and this file xm-freebsd.h. */
|
||||
|
||||
/* FreeBSD has putenv. */
|
||||
#define HAVE_PUTENV
|
||||
|
||||
/* FreeBSD has strerror. */
|
||||
#define HAVE_STRERROR
|
||||
|
||||
/* We have _sys_siglist, but the declaration in <signal.h> conflicts with
|
||||
|
@ -34,3 +32,5 @@ Boston, MA 02111-1307, USA. */
|
|||
in those files. */
|
||||
|
||||
#define DONT_DECLARE_SYS_SIGLIST
|
||||
|
||||
#define HOST_PTR_PRINTF "%p"
|
||||
|
|
|
@ -1486,7 +1486,7 @@ print_binding_level (lvl)
|
|||
tree t;
|
||||
int i = 0, len;
|
||||
fprintf (stderr, " blocks=");
|
||||
fprintf (stderr, HOST_PTR_PRINTF, lvl->blocks);
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) lvl->blocks);
|
||||
fprintf (stderr, " n_incomplete=%d parm_flag=%d keep=%d",
|
||||
list_length (lvl->incomplete), lvl->parm_flag, lvl->keep);
|
||||
if (lvl->tag_transparent)
|
||||
|
@ -1609,7 +1609,7 @@ print_other_binding_stack (stack)
|
|||
for (level = stack; level != global_binding_level; level = level->level_chain)
|
||||
{
|
||||
fprintf (stderr, "binding level ");
|
||||
fprintf (stderr, HOST_PTR_PRINTF, level);
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) level);
|
||||
fprintf (stderr, "\n");
|
||||
print_binding_level (level);
|
||||
}
|
||||
|
@ -1620,11 +1620,11 @@ print_binding_stack ()
|
|||
{
|
||||
struct binding_level *b;
|
||||
fprintf (stderr, "current_binding_level=");
|
||||
fprintf (stderr, HOST_PTR_PRINTF, current_binding_level);
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) current_binding_level);
|
||||
fprintf (stderr, "\nclass_binding_level=");
|
||||
fprintf (stderr, HOST_PTR_PRINTF, class_binding_level);
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) class_binding_level);
|
||||
fprintf (stderr, "\nglobal_binding_level=");
|
||||
fprintf (stderr, HOST_PTR_PRINTF, global_binding_level);
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) global_binding_level);
|
||||
fprintf (stderr, "\n");
|
||||
if (class_binding_level)
|
||||
{
|
||||
|
|
|
@ -46,17 +46,17 @@ print_lang_decl (file, node, indent)
|
|||
if (DECL_MAIN_VARIANT (node))
|
||||
{
|
||||
fprintf (file, " decl-main-variant ");
|
||||
fprintf (file, HOST_PTR_PRINTF, DECL_MAIN_VARIANT (node));
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) DECL_MAIN_VARIANT (node));
|
||||
}
|
||||
if (DECL_PENDING_INLINE_INFO (node))
|
||||
{
|
||||
fprintf (file, " pending-inline-info ");
|
||||
fprintf (file, HOST_PTR_PRINTF, DECL_PENDING_INLINE_INFO (node));
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) DECL_PENDING_INLINE_INFO (node));
|
||||
}
|
||||
if (DECL_TEMPLATE_INFO (node))
|
||||
{
|
||||
fprintf (file, " template-info ");
|
||||
fprintf (file, HOST_PTR_PRINTF, DECL_TEMPLATE_INFO (node));
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) DECL_TEMPLATE_INFO (node));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -542,12 +542,15 @@ void __objc_print_dtable_stats()
|
|||
#endif
|
||||
);
|
||||
|
||||
printf("arrays: %d = %ld bytes\n", narrays, (int)narrays*sizeof(struct sarray));
|
||||
printf("arrays: %d = %lu bytes\n",
|
||||
narrays, (unsigned long)narrays*sizeof(struct sarray));
|
||||
total += narrays*sizeof(struct sarray);
|
||||
printf("buckets: %d = %ld bytes\n", nbuckets, (int)nbuckets*sizeof(struct sbucket));
|
||||
printf("buckets: %d = %lu bytes\n",
|
||||
nbuckets, (unsigned long)nbuckets*sizeof(struct sbucket));
|
||||
total += nbuckets*sizeof(struct sbucket);
|
||||
|
||||
printf("idxtables: %d = %ld bytes\n", idxsize, (int)idxsize*sizeof(void*));
|
||||
printf("idxtables: %d = %lu bytes\n",
|
||||
idxsize, (unsigned long)idxsize*sizeof(void*));
|
||||
total += idxsize*sizeof(void*);
|
||||
printf("-----------------------------------\n");
|
||||
printf("total: %d bytes\n", total);
|
||||
|
|
|
@ -82,7 +82,7 @@ print_node_brief (file, prefix, node, indent)
|
|||
if (indent > 0)
|
||||
fprintf (file, " ");
|
||||
fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
|
||||
fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) node);
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) node);
|
||||
|
||||
if (class == 'd')
|
||||
{
|
||||
|
@ -259,7 +259,7 @@ print_node (file, prefix, node, indent)
|
|||
|
||||
/* Print the slot this node is in, and its code, and address. */
|
||||
fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
|
||||
fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) node);
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) node);
|
||||
|
||||
/* Print the name, if any. */
|
||||
if (class == 'd')
|
||||
|
@ -456,7 +456,7 @@ print_node (file, prefix, node, indent)
|
|||
{
|
||||
fprintf (file, "saved-insns ");
|
||||
fprintf (file, HOST_PTR_PRINTF,
|
||||
(HOST_WIDE_INT) DECL_SAVED_INSNS (node));
|
||||
(void *) DECL_SAVED_INSNS (node));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5899,7 +5899,7 @@ debug_reload()
|
|||
fprintf (stderr, ", inc by %d\n", reload_inc[r]);
|
||||
|
||||
if (reload_nocombine[r])
|
||||
fprintf (stderr, ", can combine", reload_nocombine[r]);
|
||||
fprintf (stderr, ", can combine");
|
||||
|
||||
if (reload_secondary_p[r])
|
||||
fprintf (stderr, ", secondary_reload_p");
|
||||
|
|
Loading…
Reference in a new issue