]> https://gitweb.dealii.org/ - dealii.git/commit
Suppress a warning. 4544/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 25 Jun 2017 01:42:37 +0000 (19:42 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 25 Jun 2017 01:42:37 +0000 (19:42 -0600)
commit33e0e5ee1bed56370a17d7774f5a5c8602fb435d
treede289ed9427e53fd9cf3e16019d82aeb515bfb89
parent3341d88e7fc5b444e5d330b7c58e7742fb83a8aa
Suppress a warning.

The compiler warns about the line
  header_ += gzip::magic::id2;                   // ID2.
deep in BOOST when writing the header for a gzip-compressed block of data. This
is because (i) gzip::magic::id2 is declared as an int, and (ii) has a value
greater than what a *signed char* can store, i.e., greater than 127. Furthermore,
std::string::operator+ takes a 'char', which may or may not be unsigned but
apparently on my system is signed. So we get a warning about overflow.

The only reasonable way to deal with this is to do the casting explicitly.
bundled/boost-1.62.0/include/boost/iostreams/filter/gzip.hpp

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.