This repository was archived by the owner on Jul 8, 2022. It is now read-only.
Commit c1be198
Attribute: Don't treat an integer as an char* (#403)
Currently the compiler outputs
attrgetsetprop.cpp: In member function ‘void Tango::Attribute::get_properties(Tango::AttributeConfig_3&)’:
attrgetsetprop.cpp:200:91: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
conf.event_prop.per_event.period = CORBA::string_dup((const char *)(DEFAULT_EVENT_PERIOD));
and that is justified as DEFAULT_EVENT_PERIOD is an integer.
Using the plain output operator into the stream is the preferred way.1 parent 58e4f9c commit c1be198
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
202 | | - | |
203 | 204 | | |
204 | 205 | | |
| 206 | + | |
| 207 | + | |
205 | 208 | | |
206 | 209 | | |
207 | 210 | | |
| |||
0 commit comments