mirror of https://github.com/CGAL/cgal
Fix the previous commit. Better patch to kill warnings about ignored
returned value.
This commit is contained in:
parent
184c124125
commit
ab9f2347ba
|
|
@ -144,7 +144,7 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
|
||||||
*this << "(echo \"CGAL-3D\")";
|
*this << "(echo \"CGAL-3D\")";
|
||||||
|
|
||||||
char inbuf[10];
|
char inbuf[10];
|
||||||
std::size_t retread=::read(in, inbuf, 7);
|
(void)::read(in, inbuf, 7);
|
||||||
|
|
||||||
if (std::strncmp(inbuf, "started", 7) == 0)
|
if (std::strncmp(inbuf, "started", 7) == 0)
|
||||||
{
|
{
|
||||||
|
|
@ -153,7 +153,7 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
|
||||||
// << "compulsory anymore, since CGAL 2.3" << std::endl;
|
// << "compulsory anymore, since CGAL 2.3" << std::endl;
|
||||||
|
|
||||||
// Then the next one is supposed to be CGAL-3D.
|
// Then the next one is supposed to be CGAL-3D.
|
||||||
retread=::read(in, inbuf, 7);
|
(void)::read(in, inbuf, 7);
|
||||||
if (std::strncmp(inbuf, "CGAL-3D", 7) != 0)
|
if (std::strncmp(inbuf, "CGAL-3D", 7) != 0)
|
||||||
std::cerr << "Unexpected string from Geomview !" << std::endl;
|
std::cerr << "Unexpected string from Geomview !" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
@ -171,7 +171,7 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
|
||||||
// Old original version
|
// Old original version
|
||||||
char inbuf[10];
|
char inbuf[10];
|
||||||
// Waits for "started" from the .geomview file.
|
// Waits for "started" from the .geomview file.
|
||||||
retread=::read(in, inbuf, 7);
|
(void)::read(in, inbuf, 7);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::cout << "done." << std::endl;
|
std::cout << "done." << std::endl;
|
||||||
|
|
@ -229,7 +229,7 @@ Geomview_stream::operator<<(int i)
|
||||||
// we write raw binary data to the stream.
|
// we write raw binary data to the stream.
|
||||||
int num = i;
|
int num = i;
|
||||||
I_swap_to_big_endian(num);
|
I_swap_to_big_endian(num);
|
||||||
std::size_t retwrite=::write(out, (char*)&num, sizeof(num));
|
(void)::write(out, (char*)&num, sizeof(num));
|
||||||
trace(i);
|
trace(i);
|
||||||
} else {
|
} else {
|
||||||
// transform the int in a character sequence and put whitespace around
|
// transform the int in a character sequence and put whitespace around
|
||||||
|
|
@ -249,7 +249,7 @@ Geomview_stream::operator<<(unsigned int i)
|
||||||
// we write raw binary data to the stream.
|
// we write raw binary data to the stream.
|
||||||
unsigned int num = i;
|
unsigned int num = i;
|
||||||
I_swap_to_big_endian(num);
|
I_swap_to_big_endian(num);
|
||||||
std::size_t retwrite=::write(out, (char*)&num, sizeof(num));
|
(void)::write(out, (char*)&num, sizeof(num));
|
||||||
trace(i);
|
trace(i);
|
||||||
} else {
|
} else {
|
||||||
// transform the int in a character sequence and put whitespace around
|
// transform the int in a character sequence and put whitespace around
|
||||||
|
|
@ -280,7 +280,7 @@ Geomview_stream::operator<<(double d)
|
||||||
if (get_binary_mode()) {
|
if (get_binary_mode()) {
|
||||||
float num = d;
|
float num = d;
|
||||||
I_swap_to_big_endian(num);
|
I_swap_to_big_endian(num);
|
||||||
std::size_t retwrite=::write(out, (char*)&num, sizeof(num));
|
(void)::write(out, (char*)&num, sizeof(num));
|
||||||
trace(f);
|
trace(f);
|
||||||
} else {
|
} else {
|
||||||
// 'copy' the float in a string and append a blank
|
// 'copy' the float in a string and append a blank
|
||||||
|
|
@ -467,13 +467,13 @@ Geomview_stream::operator>>(char *expr)
|
||||||
{
|
{
|
||||||
// Skip whitespaces
|
// Skip whitespaces
|
||||||
do {
|
do {
|
||||||
std::size_t retread=::read(in, expr, 1);
|
(void)::read(in, expr, 1);
|
||||||
} while (expr[0] != '(');
|
} while (expr[0] != '(');
|
||||||
|
|
||||||
int pcount = 1;
|
int pcount = 1;
|
||||||
int i = 1;
|
int i = 1;
|
||||||
while (1) {
|
while (1) {
|
||||||
std::size_t retread=::read(in, &expr[i], 1);
|
(void)::read(in, &expr[i], 1);
|
||||||
if (expr[i] == ')'){
|
if (expr[i] == ')'){
|
||||||
pcount--;
|
pcount--;
|
||||||
} else if (expr[i] == '('){
|
} else if (expr[i] == '('){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue