Declare some chars signed after the ARMv7hf compiler barfed

like this:

-mfpu=vfpv3-d16  -mfloat-abi=hard -c -o fmc.lo fmc.cpp
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
   {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,-1,-1,-1,-1,-1,-1,-1};
                                                                                          ^
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]

I wonder if it helps.
This commit is contained in:
Linus Walleij 2016-06-12 17:38:19 +02:00
commit b1c9e5c0ea
4 changed files with 9 additions and 248 deletions

View file

@ -1,11 +0,0 @@
diff -ur adplug-1.5.1.orig/doc/libadplug.texi adplug-1.5.1/doc/libadplug.texi
--- adplug-1.5.1.orig/doc/libadplug.texi 2006-01-01 23:49:53.000000000 +0100
+++ adplug-1.5.1/doc/libadplug.texi 2006-01-01 23:50:04.000000000 +0100
@@ -1,7 +1,6 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename libadplug.info
-@include version.texi
@settitle AdPlug Core Library @value{VERSION} Manual
@c %**end of header

View file

@ -1,231 +0,0 @@
diff -ur adplug-2.1-orig/src/a2m.cpp adplug-2.1/src/a2m.cpp
--- adplug-2.1-orig/src/a2m.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/a2m.cpp 2008-02-11 13:31:41.000000000 +0100
@@ -29,6 +29,7 @@
* Following commands are ignored: Gxy, Hxy, Kxy - &xy
*/
+#include <cstring>
#include "a2m.h"
const unsigned int Ca2mLoader::MAXFREQ = 2000,
diff -ur adplug-2.1-orig/src/adl.cpp adplug-2.1/src/adl.cpp
--- adplug-2.1-orig/src/adl.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/adl.cpp 2008-02-11 13:59:04.000000000 +0100
@@ -48,6 +48,7 @@
*
*/
+#include <cstring>
#include <inttypes.h>
#include <stdarg.h>
#include <assert.h>
diff -ur adplug-2.1-orig/src/adplug.cpp adplug-2.1/src/adplug.cpp
--- adplug-2.1-orig/src/adplug.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/adplug.cpp 2008-02-11 13:19:49.000000000 +0100
@@ -19,6 +19,7 @@
* adplug.cpp - CAdPlug utility class, by Simon Peter <dn.tlp@gmx.net>
*/
+#include <cstring>
#include <string>
#include <binfile.h>
diff -ur adplug-2.1-orig/src/bmf.cpp adplug-2.1/src/bmf.cpp
--- adplug-2.1-orig/src/bmf.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/bmf.cpp 2008-02-11 13:51:49.000000000 +0100
@@ -40,6 +40,7 @@
comment : inaccurate replaying, because constant outport; in original player it can be 380 or 382.
*/
+#include <cstring>
#include "bmf.h"
#include "debug.h"
diff -ur adplug-2.1-orig/src/cff.cpp adplug-2.1/src/cff.cpp
--- adplug-2.1-orig/src/cff.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/cff.cpp 2008-02-11 13:33:54.000000000 +0100
@@ -24,6 +24,7 @@
slides use previous effect data instead of current.
*/
+#include <cstring>
#include <stdlib.h>
#include "cff.h"
diff -ur adplug-2.1-orig/src/dro.cpp adplug-2.1/src/dro.cpp
--- adplug-2.1-orig/src/dro.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/dro.cpp 2008-02-11 13:56:05.000000000 +0100
@@ -23,6 +23,7 @@
* NOTES: 3-oct-04: the DRO format is not yet finalized. beware.
*/
+#include <cstring>
#include <stdio.h>
#include "dro.h"
diff -ur adplug-2.1-orig/src/dtm.cpp adplug-2.1/src/dtm.cpp
--- adplug-2.1-orig/src/dtm.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/dtm.cpp 2008-02-11 13:37:45.000000000 +0100
@@ -22,6 +22,7 @@
NOTE: Panning (Ex) effect is ignored.
*/
+#include <cstring>
#include "dtm.h"
/* -------- Public Methods -------------------------------- */
diff -ur adplug-2.1-orig/src/fmc.cpp adplug-2.1/src/fmc.cpp
--- adplug-2.1-orig/src/fmc.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/fmc.cpp 2008-02-11 13:41:19.000000000 +0100
@@ -19,6 +19,7 @@
fmc.cpp - FMC Loader by Riven the Mage <riven@ok.ru>
*/
+#include <cstring>
#include "fmc.h"
/* -------- Public Methods -------------------------------- */
diff -ur adplug-2.1-orig/src/mad.cpp adplug-2.1/src/mad.cpp
--- adplug-2.1-orig/src/mad.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/mad.cpp 2008-02-11 13:31:50.000000000 +0100
@@ -19,6 +19,7 @@
mad.cpp - MAD loader by Riven the Mage <riven@ok.ru>
*/
+#include <cstring>
#include "mad.h"
/* -------- Public Methods -------------------------------- */
diff -ur adplug-2.1-orig/src/mkj.cpp adplug-2.1/src/mkj.cpp
--- adplug-2.1-orig/src/mkj.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/mkj.cpp 2008-02-11 13:32:55.000000000 +0100
@@ -19,6 +19,7 @@
* mkj.cpp - MKJamz Player, by Simon Peter <dn.tlp@gmx.net>
*/
+#include <cstring>
#include <assert.h>
#include "mkj.h"
diff -ur adplug-2.1-orig/src/msc.cpp adplug-2.1/src/msc.cpp
--- adplug-2.1-orig/src/msc.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/msc.cpp 2008-02-11 13:57:26.000000000 +0100
@@ -19,6 +19,7 @@
* msc.c - MSC Player by Lubomir Bulej (pallas@kadan.cz)
*/
+#include <cstring>
#include <stdio.h>
#include "msc.h"
diff -ur adplug-2.1-orig/src/mtk.cpp adplug-2.1/src/mtk.cpp
--- adplug-2.1-orig/src/mtk.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/mtk.cpp 2008-02-11 13:37:52.000000000 +0100
@@ -19,6 +19,7 @@
* mtk.cpp - MPU-401 Trakker Loader by Simon Peter (dn.tlp@gmx.net)
*/
+#include <cstring>
#include "mtk.h"
/*** public methods **************************************/
diff -ur adplug-2.1-orig/src/protrack.cpp adplug-2.1/src/protrack.cpp
--- adplug-2.1-orig/src/protrack.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/protrack.cpp 2008-02-11 13:28:23.000000000 +0100
@@ -25,6 +25,7 @@
* Protracker-like format, this is most certainly the player you want to use.
*/
+#include <cstring>
#include "protrack.h"
#include "debug.h"
diff -ur adplug-2.1-orig/src/rad.cpp adplug-2.1/src/rad.cpp
--- adplug-2.1-orig/src/rad.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/rad.cpp 2008-02-11 13:43:51.000000000 +0100
@@ -22,6 +22,7 @@
* some volumes are dropped out
*/
+#include <cstring>
#include "rad.h"
CPlayer *CradLoader::factory(Copl *newopl)
diff -ur adplug-2.1-orig/src/rat.cpp adplug-2.1/src/rat.cpp
--- adplug-2.1-orig/src/rat.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/rat.cpp 2008-02-11 13:53:20.000000000 +0100
@@ -29,6 +29,7 @@
comment : there are bug in original replayer's adlib_init(): wrong frequency registers.
*/
+#include <cstring>
#include "rat.h"
#include "debug.h"
diff -ur adplug-2.1-orig/src/raw.cpp adplug-2.1/src/raw.cpp
--- adplug-2.1-orig/src/raw.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/raw.cpp 2008-02-11 13:49:33.000000000 +0100
@@ -19,6 +19,7 @@
* raw.c - RAW Player by Simon Peter <dn.tlp@gmx.net>
*/
+#include <cstring>
#include "raw.h"
/*** public methods *************************************/
diff -ur adplug-2.1-orig/src/rix.cpp adplug-2.1/src/rix.cpp
--- adplug-2.1-orig/src/rix.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/rix.cpp 2008-02-11 14:00:37.000000000 +0100
@@ -20,6 +20,7 @@
* BSPAL <BSPAL.ys168.com>
*/
+#include <cstring>
#include "rix.h"
#include "debug.h"
diff -ur adplug-2.1-orig/src/rol.cpp adplug-2.1/src/rol.cpp
--- adplug-2.1-orig/src/rol.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/rol.cpp 2008-02-11 13:54:42.000000000 +0100
@@ -20,6 +20,7 @@
*
* Visit: http://tenacity.hispeed.com/aomit/oplx/
*/
+#include <cstring>
#include <algorithm>
#include "rol.h"
diff -ur adplug-2.1-orig/src/s3m.cpp adplug-2.1/src/s3m.cpp
--- adplug-2.1-orig/src/s3m.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/s3m.cpp 2008-02-11 13:34:54.000000000 +0100
@@ -22,6 +22,7 @@
* Extra Fine Slides (EEx, FEx) & Fine Vibrato (Uxy) are inaccurate
*/
+#include <cstring>
#include "s3m.h"
const char Cs3mPlayer::chnresolv[] = // S3M -> adlib channel conversion
diff -ur adplug-2.1-orig/src/sa2.cpp adplug-2.1/src/sa2.cpp
--- adplug-2.1-orig/src/sa2.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/sa2.cpp 2008-02-11 13:50:40.000000000 +0100
@@ -20,6 +20,7 @@
* SAdT Loader by Mamiya <mamiya@users.sourceforge.net>
*/
+#include <cstring>
#include <stdio.h>
#include "sa2.h"
diff -ur adplug-2.1-orig/src/sng.cpp adplug-2.1/src/sng.cpp
--- adplug-2.1-orig/src/sng.cpp 2008-02-11 13:19:21.000000000 +0100
+++ adplug-2.1/src/sng.cpp 2008-02-11 13:20:27.000000000 +0100
@@ -19,6 +19,7 @@
* sng.cpp - SNG Player by Simon Peter <dn.tlp@gmx.net>
*/
+#include <cstring>
#include "sng.h"
CPlayer *CsngPlayer::factory(Copl *newopl)

View file

@ -1,6 +1,6 @@
diff -upr a/src/s3m.cpp b/src/s3m.cpp
--- a/src/s3m.cpp 2006-07-02 00:27:00.000000000 -0500
+++ b/src/s3m.cpp 2016-03-07 23:20:56.039017533 -0600
diff -ur adplug-2.2.1-orig/src/s3m.cpp adplug-2.2.1/src/s3m.cpp
--- adplug-2.2.1-orig/src/s3m.cpp 2016-06-12 17:19:33.369934280 +0200
+++ adplug-2.2.1/src/s3m.cpp 2016-06-12 17:32:36.190932642 +0200
@@ -25,7 +25,7 @@
#include <cstring>
#include "s3m.h"
@ -10,9 +10,10 @@ diff -upr a/src/s3m.cpp b/src/s3m.cpp
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,-1,-1,-1,-1,-1,-1,-1};
const unsigned short Cs3mPlayer::notetable[12] = // S3M adlib note table
--- a/src/s3m.h 2006-05-13 00:36:42.000000000 -0500
+++ b/src/s3m.h 2016-03-08 00:56:07.953972552 -0600
@@ -90,7 +90,7 @@ class Cs3mPlayer: public CPlayer
diff -ur adplug-2.2.1-orig/src/s3m.h adplug-2.2.1/src/s3m.h
--- adplug-2.2.1-orig/src/s3m.h 2016-06-12 17:19:33.367934293 +0200
+++ adplug-2.2.1/src/s3m.h 2016-06-12 17:37:14.538154102 +0200
@@ -90,7 +90,7 @@
unsigned char crow,ord,speed,tempo,del,songend,loopstart,loopcnt;
private:

View file

@ -10,6 +10,7 @@ URL: http://adplug.sourceforge.net/
Group: Applications/Multimedia
Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
Source1: http://download.sourceforge.net/%{name}/adplugdb-%{adplugdbver}.tar.gz
Patch0: adplug-2.2.1-signed-char.patch
License: LGPLv2+
BuildRequires: libbinio-devel >= 1.4
BuildRequires: pkgconfig
@ -44,6 +45,7 @@ This package contains development files for the AdPlug AdLib
%prep
%setup -q
%patch0 -p1
tar xvfz %{SOURCE1}
# Include these by different name
mv %{adplugdbver}/README README.adplugdb