Commit 57dc28e
authored
Fix a dangling pointer discovered by a fresh Clang (ros2#1222)
Fix a dangling pointer discovered by the -Wdangling Clang diagnostic:
```
rcl/src/rcl/node_resolve_name.c:95:26: error: temporary whose address is used as value of local variable 'error' will be destroyed at the end of the full-expression [-Werror,-Wdangling]
95 | const char * error = rmw_get_error_string().str;
```
Signed-off-by: Alexander Kornienko <alexfh@google.com>1 parent cc72fc1 commit 57dc28e
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
0 commit comments