Commit 1e1cb37
committed
Silent warnings -Wunused-result of g++-4.7
Pointed out by Joachim:
| Date: Sun, 10 Jun 2012 17:43:27 +0200
| From: Joachim Reichel <[email protected]>
| To: Laurent Rineau <[email protected]>
| Subject: silence warnings caused by -Wunused-result
|
| Hi Laurent,
|
| your changes in 61145 and 61146 to silence the warnings in the Geomview
| package don't work with gcc 4.7.0 and -Wunused-result. I still see
|
| src/CGAL/Geomview_stream.cpp:148:35: warning: ignoring return value of
| 'ssize_t read(int, void*, size_t)', declared with attribute
| warn_unused_result [-Wunused-result]
|
| Maybe one really needs to use
|
| int result = read(...)
| (void) result;
|
| to silence the warnings.
|
| Joachim
I have not been able to reproduce that with my compiler "g++-trunk (GCC)
4.8.0 20120611 (experimental)".1 parent 7f08b8b commit 1e1cb37
1 file changed
+16
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | | - | |
| 158 | + | |
| 159 | + | |
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
| |||
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
175 | | - | |
| 177 | + | |
| 178 | + | |
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| |||
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
233 | | - | |
| 236 | + | |
| 237 | + | |
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
| |||
250 | 254 | | |
251 | 255 | | |
252 | 256 | | |
253 | | - | |
| 257 | + | |
| 258 | + | |
254 | 259 | | |
255 | 260 | | |
256 | 261 | | |
| |||
281 | 286 | | |
282 | 287 | | |
283 | 288 | | |
284 | | - | |
| 289 | + | |
| 290 | + | |
285 | 291 | | |
286 | 292 | | |
287 | 293 | | |
| |||
468 | 474 | | |
469 | 475 | | |
470 | 476 | | |
471 | | - | |
| 477 | + | |
| 478 | + | |
472 | 479 | | |
473 | 480 | | |
474 | 481 | | |
475 | 482 | | |
476 | 483 | | |
477 | | - | |
| 484 | + | |
| 485 | + | |
478 | 486 | | |
479 | 487 | | |
480 | 488 | | |
| |||
0 commit comments