Bug Summary

File:/home/joel/rtems-4.11-work/build/rtems/c/src/../../cpukit/libmisc/monitor/mon-region.c
Location:line 70, column 5
Description:Value stored to 'length' is never read

Annotated Source Code

1/*
2 * RTEMS Monitor region support
3 *
4 * $Id: mon-region.c,v 1.7 2010/04/12 15:25:43 ralf Exp $
5 */
6
7#ifdef HAVE_CONFIG_H1
8#include "config.h"
9#endif
10
11#include <rtems.h>
12#include "monitor.h"
13#include <rtems/rtems/attr.inl>
14#include <stdio.h>
15#include <string.h> /* memcpy() */
16
17void
18rtems_monitor_region_canonical(
19 rtems_monitor_region_t *canonical_region,
20 void *region_void
21)
22{
23 Region_Control *rtems_region = (Region_Control *) region_void;
24
25 canonical_region->attribute = rtems_region->attribute_set;
26 canonical_region->start_addr = rtems_region->starting_address;
27 canonical_region->length = rtems_region->length;
28 canonical_region->page_size = rtems_region->page_size;
29 canonical_region->max_seg_size = rtems_region->maximum_segment_size;
30 canonical_region->used_blocks = rtems_region->number_of_used_blocks;
31}
32
33
34void
35rtems_monitor_region_dump_header(
36 bool_Bool verbose __attribute__((unused))
37)
38{
39 printf("\
40 ID NAME ATTR STARTADDR LENGTH PAGE_SIZE USED_BLOCKS\n");
41/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 1234
42 1 2 3 4 5 6 7 */
43
44 rtems_monitor_separator();
45}
46
47/*
48 */
49
50void
51rtems_monitor_region_dump(
52 rtems_monitor_region_t *monitor_region,
53 bool_Bool verbose __attribute__((unused))
54)
55{
56 int length = 0;
57
58 length += rtems_monitor_dump_id(monitor_region->id);
59 length += rtems_monitor_pad(11, length);
60 length += rtems_monitor_dump_name(monitor_region->id);
61 length += rtems_monitor_pad(18, length);
62 length += rtems_monitor_dump_attributes(monitor_region->attribute);
63 length += rtems_monitor_pad(30, length);
64 length += rtems_monitor_dump_addr(monitor_region->start_addr);
65 length += rtems_monitor_pad(40, length);
66 length += rtems_monitor_dump_hex(monitor_region->length);
67 length += rtems_monitor_pad(50, length);
68 length += rtems_monitor_dump_hex(monitor_region->page_size);
69 length += rtems_monitor_pad(60, length);
70 length += rtems_monitor_dump_hex(monitor_region->used_blocks);
Value stored to 'length' is never read
71 printf("\n");
72}
73