Changeset 3523321 in rtems


Ignore:
Timestamp:
Aug 30, 2006, 1:53:02 PM (14 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
eba52fd3
Parents:
48b1e29
Message:

2006-08-30 Joel Sherrill <joel@…>

  • libmisc/cpuuse/cpuuse.c, libmisc/monitor/mon-command.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-symbols.c, libmisc/rtmonuse/rtmonuse.c, libmisc/stackchk/check.c, libnetworking/libc/res_debug.c, telnetd/telnetd.c: Remove printf format warnings.
Location:
cpukit
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r48b1e29 r3523321  
     12006-08-30      Joel Sherrill <joel@OARcorp.com>
     2
     3        * libmisc/cpuuse/cpuuse.c, libmisc/monitor/mon-command.c,
     4        libmisc/monitor/mon-driver.c, libmisc/monitor/mon-symbols.c,
     5        libmisc/rtmonuse/rtmonuse.c, libmisc/stackchk/check.c,
     6        libnetworking/libc/res_debug.c, telnetd/telnetd.c: Remove printf
     7        format warnings.
     8
    192006-08-30      Joel Sherrill <joel@OARcorp.com>
    210
  • cpukit/libmisc/cpuuse/cpuuse.c

    r48b1e29 r3523321  
    2424#include <stdlib.h>
    2525#include <ctype.h>
     26#include <inttypes.h>
    2627
    2728#include <rtems/cpuuse.h>
     
    99100        if ( !isprint(name[3]) ) name[3] = '*';
    100101
    101         ival = total_units ? the_thread->ticks_executed * 10000 / total_units : 0;
    102                 fval = ival % 100;
    103                 ival /= 100;
    104                 fprintf(stdout, "0x%08x   %4s    %8d     %3d.%2.2d\n",
     102        ival = total_units ?
     103                 the_thread->ticks_executed * 10000 / total_units : 0;
     104        fval = ival % 100;
     105        ival /= 100;
     106        fprintf(stdout,
     107          "0x%08" PRIu32 "   %4s    %8" PRId32 "     %3" PRId32
     108             ".%2.2" PRId32"\n",
    105109          the_thread->Object.id,
    106110          name,
    107111          the_thread->ticks_executed,
    108                   ival,
    109                   fval
     112          ival,
     113          fval
    110114        );
    111115      }
     
    114118
    115119  fprintf(stdout,
    116     "\nTicks since last reset = %d\n",
     120    "\nTicks since last reset = %" PRId32 "\n",
    117121    _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset
    118122  );
    119   fprintf(stdout, "\nTotal Units = %d\n", total_units );
     123  fprintf(stdout, "\nTotal Units = %" PRId32 "\n", total_units );
    120124}
    121125
  • cpukit/libmisc/monitor/mon-command.c

    r48b1e29 r3523321  
    1818#include <string.h>
    1919#include <stdlib.h>
     20#include <inttypes.h>
    2021
    2122#ifndef MONITOR_PROMPT
     
    497498             (env_prompt == NULL) ? MONITOR_PROMPT: env_prompt);
    498499  else if (rtems_monitor_default_node != rtems_monitor_node)
    499     sprintf (monitor_prompt, "%d-%s-%d", rtems_monitor_node,
     500    sprintf (monitor_prompt, "%" PRId32 "-%s-%" PRId32 "", rtems_monitor_node,
    500501             (env_prompt == NULL) ? MONITOR_PROMPT : env_prompt,
    501502             rtems_monitor_default_node);
    502503  else
    503     sprintf (monitor_prompt, "%d-%s", rtems_monitor_node,
     504    sprintf (monitor_prompt, "%" PRId32 "-%s", rtems_monitor_node,
    504505             (env_prompt == NULL) ? MONITOR_PROMPT : env_prompt);
    505506
  • cpukit/libmisc/monitor/mon-driver.c

    r48b1e29 r3523321  
    3131#include <stdio.h>
    3232#include <stdlib.h>             /* strtoul() */
     33#include <inttypes.h>
    3334
    3435#define DATACOL 15
     
    111112    uint32_t            length = 0;
    112113
    113     length += fprintf(stdout,"  %d", monitor_driver->id);
     114    length += fprintf(stdout,"  %" PRId32 "", monitor_driver->id);
    114115
    115116    length += rtems_monitor_pad(13, length);
  • cpukit/libmisc/monitor/mon-symbols.c

    r48b1e29 r3523321  
    2222#include <stdio.h>
    2323#include <stdlib.h>
     24#include <inttypes.h>
    2425
    2526#include <rtems/monitor.h>
     
    401402                             canonical_symbol->name);
    402403        else
    403             length += fprintf(stdout,"<%.*s+0x%x>",
     404            length += fprintf(stdout,"<%.*s+0x%" PRIx32 ">",
    404405                             (int) sizeof(canonical_symbol->name),
    405406                             canonical_symbol->name,
    406407                             canonical_symbol->offset);
    407408        if (verbose)
    408             length += fprintf(stdout," [0x%x]", canonical_symbol->value);
     409            length += fprintf(stdout,
     410                        " [0x%" PRIx32 "]", canonical_symbol->value);
    409411    }
    410412    else
    411         length += fprintf(stdout,"[0x%x]", canonical_symbol->value);
     413        length += fprintf(stdout,"[0x%" PRIx32 "]", canonical_symbol->value);
    412414
    413415    return length;
  • cpukit/libmisc/rtmonuse/rtmonuse.c

    r48b1e29 r3523321  
    1212#include <assert.h>
    1313#include <ctype.h>
     14#include <inttypes.h>
    1415
    1516#include <rtems/rtmonuse.h>
     
    193194
    194195    fprintf(stdout,
    195       "0x%08x  %4s   %6d   %3d       %d/%d/%5.2f    %d/%d/%3.2f\n",
     196      "0x%08" PRIx32 "  %4s   %6" PRId32 "   %3" PRId32 "       %" PRId32
     197         "/%" PRId32 "/%5.2f    %" PRId32 "/%" PRId32 "/%3.2f\n",
    196198      the_usage->id,
    197199      name,
  • cpukit/libmisc/stackchk/check.c

    r48b1e29 r3523321  
    2323
    2424#include <rtems.h>
     25#include <inttypes.h>
    2526
    2627/*
     
    316317    fprintf(
    317318        stderr,
    318         "BLOWN STACK!!! Offending task(%p): id=0x%08x; name=0x%08x",
     319        "BLOWN STACK!!! Offending task(%p): id=0x%08" PRIx32
     320             "; name=0x%08" PRIx32,
    319321        running,
    320322        running->Object.id,
    321         (uint32_t  )running->Object.name
     323        (uint32_t) running->Object.name
    322324    );
    323325    fflush(stderr);
     
    326328        fprintf(
    327329          stderr,
    328           "; node=%d\n",
     330          "; node=%" PRId32 "\n",
    329331          rtems_configuration_get_user_multiprocessing_table()->node
    330332       );
     
    335337    fprintf(
    336338        stderr,
    337         "  stack covers range 0x%08x - 0x%08x (%d bytes)\n",
    338         (uint32_t  ) stack->area,
    339         (uint32_t  ) stack->area + stack->size - 1,
    340         (uint32_t  ) stack->size);
     339        "  stack covers range %p - %p" PRIx32 " (%" PRId32 " bytes)\n",
     340        stack->area,
     341        stack->area + stack->size - 1,
     342        stack->size);
    341343    fflush(stderr);
    342344
     
    481483  }
    482484
    483   fprintf(stdout, "0x%08x  %4s  0x%08x  0x%08x   %8d   %8d\n",
     485  fprintf(stdout, "0x%08" PRIx32 "  %4s  %p - %p"
     486             "   %8" PRId32 "   %8" PRId32 "\n",
    484487          the_thread ? the_thread->Object.id : ~0,
    485488          name,
    486           (uint32_t  ) stack->area,
    487           (uint32_t  ) stack->area + (uint32_t  ) stack->size - 1,
     489          stack->area,
     490          stack->area + stack->size - 1,
    488491          size,
    489492          used
  • cpukit/libnetworking/libc/res_debug.c

    r48b1e29 r3523321  
    535535
    536536        if (ns_format_ttl(value, nbuf, sizeof nbuf) < 0)
    537                 sprintf(nbuf, "%" PRIu32, value);
     537                sprintf(nbuf, "%" PRIu32, (uint32_t) value);
    538538        return (nbuf);
    539539}
  • cpukit/telnetd/telnetd.c

    r48b1e29 r3523321  
    3535#include <string.h>     /* memset */
    3636#include <stdio.h>
     37#include <inttypes.h>
    3738
    3839/* FIXME: This should not be here */
     
    125126        sc=rtems_initialize_telnetd();
    126127        if (sc!=RTEMS_SUCCESSFUL) return sc;
    127         printf("rtems_telnetd() started with stacksize=%u,priority=%d\n",
    128                         telnetd_stack_size,telnetd_task_priority);
     128        printf(
     129          "rtems_telnetd() started with stacksize=%" PRIu32
     130             ",priority=%" PRId32 "\n",
     131          telnetd_stack_size,telnetd_task_priority);
    129132        return 0;
    130133}
Note: See TracChangeset for help on using the changeset viewer.