4.115
Last change
on this file since 98b785e was
9e14ca2,
checked in by Ralf Corsepius <ralf.corsepius@…>, on 09/15/09 at 09:29:55
|
Add attribute((unused)) to function arguments.
|
-
Property mode set to
100644
|
File size:
718 bytes
|
Line | |
---|
1 | /* |
---|
2 | * assoc.c |
---|
3 | * rtems assoc routines |
---|
4 | * |
---|
5 | * $Id$ |
---|
6 | */ |
---|
7 | |
---|
8 | #if HAVE_CONFIG_H |
---|
9 | #include "config.h" |
---|
10 | #endif |
---|
11 | |
---|
12 | #include <rtems.h> |
---|
13 | #include <rtems/assoc.h> |
---|
14 | |
---|
15 | #include <inttypes.h> |
---|
16 | #include <stdio.h> /* sprintf */ |
---|
17 | |
---|
18 | /* |
---|
19 | * what to return if a value is not found |
---|
20 | * this is not reentrant, but it really shouldn't be invoked anyway |
---|
21 | */ |
---|
22 | |
---|
23 | const char * |
---|
24 | rtems_assoc_name_bad( |
---|
25 | #ifdef RTEMS_DEBUG |
---|
26 | uint32_t bad_value |
---|
27 | #else |
---|
28 | uint32_t bad_value __attribute((unused)) |
---|
29 | #endif |
---|
30 | ) |
---|
31 | { |
---|
32 | #ifdef RTEMS_DEBUG |
---|
33 | static char bad_buffer[32]; |
---|
34 | |
---|
35 | sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); |
---|
36 | #else |
---|
37 | static char bad_buffer[40] = "<assocnamebad.c: : BAD NAME>"; |
---|
38 | #endif |
---|
39 | return bad_buffer; |
---|
40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.