Bug Summary

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

Annotated Source Code

1/*
2 * RTEMS Monitor extension support
3 *
4 * $Id: mon-extension.c,v 1.14 2009/01/02 13:01:21 ralf Exp $
5 */
6
7#ifdef HAVE_CONFIG_H1
8#include "config.h"
9#endif
10
11#include <rtems.h>
12#include <rtems/monitor.h>
13
14#include <stdio.h>
15
16void
17rtems_monitor_extension_canonical(
18 rtems_monitor_extension_t *canonical_extension,
19 void *extension_void
20)
21{
22 Extension_Control *rtems_extension = (Extension_Control *) extension_void;
23 rtems_extensions_table *e = &rtems_extension->Extension.Callouts;
24
25 rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_create,
26 (void *) e->thread_create);
27
28 rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_start,
29 (void *) e->thread_start);
30 rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_restart,
31 (void *) e->thread_restart);
32 rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_delete,
33 (void *) e->thread_delete);
34 rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_tswitch,
35 (void *) e->thread_switch);
36 rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_begin,
37 (void *) e->thread_begin);
38 rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_exitted,
39 (void *) e->thread_exitted);
40 rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_fatal,
41 (void *) e->fatal);
42}
43
44void
45rtems_monitor_extension_dump_header(
46 bool_Bool verbose __attribute__((unused))
47)
48{
49 fprintf(stdoutstdout,"\
50 ID NAME\n");
51/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
520 1 2 3 4 5 6 7 */
53
54 rtems_monitor_separator();
55}
56
57
58/*
59 * Dump out the canonical form
60 */
61
62void
63rtems_monitor_extension_dump(
64 rtems_monitor_extension_t *monitor_extension,
65 bool_Bool verbose
66)
67{
68 uint32_t length = 0;
69
70 length += rtems_monitor_dump_id(monitor_extension->id);
71 length += rtems_monitor_pad(11, length);
72 length += rtems_monitor_dump_name(monitor_extension->id);
73
74 length += rtems_monitor_pad(18, length);
75 length += fprintf(stdoutstdout,"create: ");
76 length += rtems_monitor_symbol_dump(&monitor_extension->e_create, verbose);
77 length += fprintf(stdoutstdout,"; start: ");
78 length += rtems_monitor_symbol_dump(&monitor_extension->e_start, verbose);
79 length += fprintf(stdoutstdout,"; restart: ");
80 length += rtems_monitor_symbol_dump(&monitor_extension->e_restart, verbose);
81 length += fprintf(stdoutstdout,"\n");
82 length = 0;
83
84 length += rtems_monitor_pad(18, length);
85 length += fprintf(stdoutstdout,"delete: ");
86 length += rtems_monitor_symbol_dump(&monitor_extension->e_delete, verbose);
87 length += fprintf(stdoutstdout,"; switch: ");
88 length += rtems_monitor_symbol_dump(&monitor_extension->e_tswitch, verbose);
89 length += fprintf(stdoutstdout,"; begin: ");
90 length += rtems_monitor_symbol_dump(&monitor_extension->e_begin, verbose);
91 length += fprintf(stdoutstdout,"\n");
92 length = 0;
93
94 length += rtems_monitor_pad(18, length);
95 length += fprintf(stdoutstdout,"exitted: ");
96 length += rtems_monitor_symbol_dump(&monitor_extension->e_exitted, verbose);
97 length += fprintf(stdoutstdout,"; fatal: ");
98 length += rtems_monitor_symbol_dump(&monitor_extension->e_fatal, verbose);
99 length += fprintf(stdoutstdout,"\n");
Value stored to 'length' is never read
100 length = 0;
101 fprintf(stdoutstdout,"\n");
102}