Control: tags -1 patch
On Fri, Aug 17, 2018 at 07:20:58PM +0000, Santiago Vila wrote:
>...
> [... snipped ...]
>
> fweelin_browser.h:245:14: warning: deprecated conversion from string constant
> to 'char*' [-Wwrite-strings]
> return "Patch";
> ^~~~~~~
> fweelin_browser.h:248:14: warning: deprecated conversion from string constant
> to 'char*' [-Wwrite-strings]
> return "**UNKNOWN**";
> ^~~~~~~~~~~~~
> In file included from fweelin_core.h:42,
> from fweelin.cc:50:
> fweelin_config.h: In member function 'char* FloConfig::GetCodecName(codec)':
> fweelin_config.h:856:27: warning: deprecated conversion from string constant
> to 'char*' [-Wwrite-strings]
> case VORBIS: return "ogg";
> ^~~~~
> fweelin_config.h:857:24: warning: deprecated conversion from string constant
> to 'char*' [-Wwrite-strings]
> case WAV: return "wav";
> ^~~~~
> fweelin_config.h:858:25: warning: deprecated conversion from string constant
> to 'char*' [-Wwrite-strings]
> case FLAC: return "flac";
> ^~~~~~
> fweelin_config.h:859:23: warning: deprecated conversion from string constant
> to 'char*' [-Wwrite-strings]
> case AU: return "au";
> ^~~~
> fweelin_config.h:860:23: warning: deprecated conversion from string constant
> to 'char*' [-Wwrite-strings]
> default: return "UNKNOWN";
> ^~~~~~~~~
> fweelin_config.h: In member function 'char*
> FloConfig::GetAudioFileExt(codec)':
> fweelin_config.h:874:27: warning: deprecated conversion from string constant
> to 'char*' [-Wwrite-strings]
> case VORBIS: return ".ogg";
> ^~~~~~
> fweelin_config.h:875:24: warning: deprecated conversion from string constant
> to 'char*' [-Wwrite-strings]
> case WAV: return ".wav";
> ^~~~~~
> fweelin_config.h:876:25: warning: deprecated conversion from string constant
> to 'char*' [-Wwrite-strings]
> case FLAC: return ".flac";
> ^~~~~~~
> fweelin_config.h:877:23: warning: deprecated conversion from string constant
> to 'char*' [-Wwrite-strings]
> case AU: return ".au";
> ^~~~~
> fweelin_config.h:878:23: warning: deprecated conversion from string constant
> to 'char*' [-Wwrite-strings]
> default: return ".ogg";
> ^~~~~~
> make[2]: *** [Makefile:291: fweelin.o] Error 1
>...
The actual error message is:
...
In file included from /usr/include/unicode/utypes.h:38,
from /usr/include/unicode/ucnv_err.h:88,
from /usr/include/unicode/ucnv.h:52,
from /usr/include/libxml2/libxml/encoding.h:31,
from /usr/include/libxml2/libxml/parser.h:810,
from /usr/include/libxml2/libxml/globals.h:18,
from /usr/include/libxml2/libxml/threads.h:35,
from /usr/include/libxml2/libxml/xmlmemory.h:218,
from fweelin_config.h:23,
from fweelin_core.h:42,
from fweelin.cc:50:
/usr/include/unicode/umachine.h: At global scope:
/usr/include/unicode/umachine.h:347:13: error: 'char16_t' does not name a type;
did you mean 'wchar_t'?
typedef char16_t UChar;
...
This can be fixed by replacing the -std=gnu++98 workaround with the
attached backport of the proper upstream fix.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
diff --git a/src/fweelin_videoio.cc b/src/fweelin_videoio.cc
index e7250a2..9aabc92 100644
--- a/src/fweelin_videoio.cc
+++ b/src/fweelin_videoio.cc
@@ -50,7 +50,7 @@ double mygettime(void) {
return(mytv.tv_sec+mytv.tv_usec/1000000.0);
}
-int round(float num) {
+int myround(float num) {
if (num-(long)num < 0.5)
return (int) floor(num);
else
@@ -107,7 +107,7 @@ CircularMap::CircularMap(SDL_Surface *in,
printf(" in[%d,%d]\n",(int)in_x,(int)in_y);*/
// Yup-- write the map
- map[idx] = in_base + round(in_y)*pitch + round(in_x)*bpp;
+ map[idx] = in_base + myround(in_y)*pitch + myround(in_x)*bpp;
// Generate scan map
if (pixelscount <= 0) {