Bug Summary

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

Annotated Source Code

1/*
2 * RTEMS Monitor init task support
3 *
4 * $Id: mon-itask.c,v 1.20 2009/11/29 12:12:39 ralf Exp $
5 */
6
7#ifdef HAVE_CONFIG_H1
8#include "config.h"
9#endif
10
11#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
12#include <rtems.h>
13#include <rtems/monitor.h>
14
15#include <inttypes.h>
16#include <stdio.h>
17
18/*
19 * As above, but just for init tasks
20 */
21void
22rtems_monitor_init_task_canonical(
23 rtems_monitor_init_task_t *canonical_itask,
24 void *itask_void
25)
26{
27 rtems_initialization_tasks_table *rtems_itask = itask_void;
28
29 rtems_monitor_symbol_canonical_by_value(&canonical_itask->entry,
30 (void *) rtems_itask->entry_point);
31
32 canonical_itask->argument = rtems_itask->argument;
33 canonical_itask->stack_size = rtems_itask->stack_size;
34 canonical_itask->priority = rtems_itask->initial_priority;
35 canonical_itask->modes = rtems_itask->mode_set;
36 canonical_itask->attributes = rtems_itask->attribute_set;
37}
38
39void *
40rtems_monitor_init_task_next(
41 void *object_info __attribute__((unused)),
42 rtems_monitor_init_task_t *canonical_init_task,
43 rtems_id *next_id
44)
45{
46 rtems_initialization_tasks_table *itask;
47 uint32_t n = rtems_object_id_get_index(*next_id)_Objects_Get_index( *next_id );
48
49 if (n >= Configuration_RTEMS_API.number_of_initialization_tasks)
50 goto failed;
51
52 _Thread_Disable_dispatch();
53
54 itask = Configuration_RTEMS_API.User_initialization_tasks_table + n;
55
56 /*
57 * dummy up a fake id and name for this item
58 */
59
60 canonical_init_task->id = n;
61 canonical_init_task->name = itask->name;
62
63 *next_id += 1;
64 return (void *) itask;
65
66failed:
67 *next_id = RTEMS_OBJECT_ID_FINAL((Objects_Id)~0);
68 return 0;
69}
70
71
72void
73rtems_monitor_init_task_dump_header(
74 bool_Bool verbose __attribute__((unused))
75)
76{
77 fprintf(stdoutstdout,"\
78 # NAME ENTRY ARGUMENT PRIO MODES ATTRIBUTES STACK SIZE\n");
79/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
800 1 2 3 4 5 6 7 */
81 rtems_monitor_separator();
82}
83
84/*
85 */
86
87void
88rtems_monitor_init_task_dump(
89 rtems_monitor_init_task_t *monitor_itask,
90 bool_Bool verbose
91)
92{
93 int length = 0;
94
95 length += rtems_monitor_dump_decimal(monitor_itask->id);
96
97 length += rtems_monitor_pad(7, length);
98 length += rtems_monitor_dump_name(monitor_itask->id);
99
100 length += rtems_monitor_pad(14, length);
101 length += rtems_monitor_symbol_dump(&monitor_itask->entry, verbose);
102
103 length += rtems_monitor_pad(25, length);
104 length += fprintf(stdoutstdout,"%" PRId32"d" " [0x%" PRIx32"x" "]",
105 monitor_itask->argument, monitor_itask->argument);
106
107 length += rtems_monitor_pad(39, length);
108 length += rtems_monitor_dump_priority(monitor_itask->priority);
109
110 length += rtems_monitor_pad(46, length);
111 length += rtems_monitor_dump_modes(monitor_itask->modes);
112
113 length += rtems_monitor_pad(54, length);
114 length += rtems_monitor_dump_attributes(monitor_itask->attributes);
115
116 length += rtems_monitor_pad(66, length);
117 length += fprintf(stdoutstdout,"%" PRId32"d" " [0x%" PRIx32"x" "]",
Value stored to 'length' is never read
118 monitor_itask->stack_size, monitor_itask->stack_size);
119
120 fprintf(stdoutstdout,"\n");
121}