Bug Summary

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

Annotated Source Code

1/*
2 * RTEMS Monitor partition support
3 *
4 * $Id: mon-part.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_part_canonical(
19 rtems_monitor_part_t *canonical_part,
20 void *part_void
21)
22{
23 Partition_Control *rtems_part = (Partition_Control *) part_void;
24
25 canonical_part->attribute = rtems_part->attribute_set;
26 canonical_part->start_addr = rtems_part->starting_address;
27 canonical_part->length = rtems_part->length;
28 canonical_part->buf_size = rtems_part->buffer_size;
29 canonical_part->used_blocks = rtems_part->number_of_used_blocks;
30}
31
32
33void
34rtems_monitor_part_dump_header(
35 bool_Bool verbose __attribute__((unused))
36)
37{
38 printf("\
39 ID NAME ATTR STARTADDR LENGTH BUF_SIZE USED_BLOCKS\n");
40/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 1234
41 1 2 3 4 5 6 7 */
42
43 rtems_monitor_separator();
44}
45
46/*
47 */
48
49void
50rtems_monitor_part_dump(
51 rtems_monitor_part_t *monitor_part,
52 bool_Bool verbose __attribute__((unused))
53)
54{
55 int length = 0;
56
57 length += rtems_monitor_dump_id(monitor_part->id);
58 length += rtems_monitor_pad(11, length);
59 length += rtems_monitor_dump_name(monitor_part->id);
60 length += rtems_monitor_pad(18, length);
61 length += rtems_monitor_dump_attributes(monitor_part->attribute);
62 length += rtems_monitor_pad(30, length);
63 length += rtems_monitor_dump_addr(monitor_part->start_addr);
64 length += rtems_monitor_pad(40, length);
65 length += rtems_monitor_dump_hex(monitor_part->length);
66 length += rtems_monitor_pad(50, length);
67 length += rtems_monitor_dump_hex(monitor_part->buf_size);
68 length += rtems_monitor_pad(60, length);
69 length += rtems_monitor_dump_hex(monitor_part->used_blocks);
Value stored to 'length' is never read
70 printf("\n");
71}
72