Skip to content

Commit

Permalink
Fixed more errors/warnings uncovered by clang-16 for ussue #124.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahlstromcj committed Dec 7, 2023
1 parent e8b928f commit 5dcd2cc
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 22 deletions.
12 changes: 11 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TO DO for Seq66 0.99.11
Chris Ahlstrom
2019-04-13 to 2023-12-06
2019-04-13 to 2023-12-07

Misc:

Expand All @@ -27,6 +27,16 @@ Misc:
into a pattern when recording is set. [Turns out to be quite tricky!]
- The Carpet song has PPQN = 120 and displays weirdly in pattern editor.
Too difficult to fix at this time; converted it to 192.
- trilogy.mid errors:
[seq66] Offset ~0xae18 of 0x16872 bytes (44568/92274):
Unsupported MIDI event. Bad value 0x56.
[seq66] Unexpected meta type 0x2f offset ~0xaee7
[seq66] Unexpected meta type 0x2f offset ~0xaf82
[seq66] Unexpected meta type 0x2f offset ~0xca35
[seq66] Unexpected meta type 0x2f offset ~0x149e4
[seq66] Unexpected meta type 0x2f offset ~0x167df
[seq66] Unexpected meta type 0x2f offset ~0x16822
[seq66] Read: '/home/ahlstrom/Downloads/Trilogy.mid'

Mutes:

Expand Down
17 changes: 15 additions & 2 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# \library Seq66
# \author Chris Ahlstrom
# \date 2018-11-09
# \update 2022-05-23
# \update 2023-12-06
# \version $Revision$
# \license $XPC_SUITE_GPL_LICENSE$
#
Expand Down Expand Up @@ -36,7 +36,7 @@ LANG=C
export LANG
CYGWIN=binmode
export CYGWIN
export SEQ66_SCRIPT_EDIT_DATE="2022-05-23"
export SEQ66_SCRIPT_EDIT_DATE="2022-12-06"
export SEQ66_LIBRARY_API_VERSION="0.99"
export SEQ66_LIBRARY_VERSION="$SEQ66_LIBRARY_API_VERSION.9"

Expand Down Expand Up @@ -66,6 +66,7 @@ checkdir libseq66
# Option settings
#------------------------------------------------------------------------------

DOAUTOCONF_ONLY="no"
DOBOOTSTRAP="yes"
DOCONFIGURE="no"
DONSM="yes"
Expand Down Expand Up @@ -106,6 +107,7 @@ and creates the 'configure' script. It can super-clean the project, removing
all generated files and directories. It provides options to save trouble
passing long options to the configure script for some canned setups.
--autoconf Just create the autoconf/automake setup and exit.
--clean Delete the usual derived files from the project.
--full-clean Delete all derived and configure-related files. The
bootstrap script will need to be run again.
Expand Down Expand Up @@ -152,6 +154,12 @@ if [ $# -ge 1 ] ; then

case "$1" in

--autoconf)

DOAUTOCONF_ONLY="yes"
DOCONFIGURE="no"
;;

--no-bootstrap | -nb)
DOBOOTSTRAP="no"
DOCONFIGURE="no"
Expand Down Expand Up @@ -492,6 +500,11 @@ E_O_F

cp contrib/mkinstalldirs-1.10 aux-files/mkinstalldirs

if [ $DOAUTOCONF_ONLY == "yes" ] ; then
echo "Autoconf is set up, exiting..."
exit 0
fi

# At this point, remove files which always need to be regenerated.
# Right now, this is done with the --clean option.

Expand Down
15 changes: 14 additions & 1 deletion contrib/midi/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIDI Sample and Test Files
Chris Ahlstrom
2015-09-11 to 2023-11-25
2015-09-11 to 2023-12-07

This directory contains contributed MIDI files for examples and testing.
Also see the test files from the midicvt as described in
Expand Down Expand Up @@ -110,6 +110,19 @@ the "example1" file.

A version more like the original.

trilogy.mid:

A file found that yields unexpected data:

Offset ~0xae18 of 0x16872 bytes (44568/92274):
Unsupported MIDI event. Bad value 0x56.
Unexpected meta type 0x2f offset ~0xaee7
Unexpected meta type 0x2f offset ~0xaf82
Unexpected meta type 0x2f offset ~0xca35
Unexpected meta type 0x2f offset ~0x149e4
Unexpected meta type 0x2f offset ~0x167df
Unexpected meta type 0x2f offset ~0x16822

There are many other files, used for testing fixes, that are not documented
here.

Expand Down
Binary file added contrib/midi/trilogy.mid
Binary file not shown.
29 changes: 29 additions & 0 deletions contrib/scripts/configure-clang
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
#------------------------------------------------------------------------------
##
# \file configure-clang
# \library bin
# \author Chris Ahlstrom
# \date 2023-12-06 to 2023-12-06
# \version $Revision$
# \license GNU GPLv2 or above
#
# This script tries to set up got building Seq66 with clang.
#
#------------------------------------------------------------------------------

export CC=clang
export CXX=clang++
export RANLIB=llvm-ranlib
export CFLAGS=" -flto -std=gnu99 "
export LDFLAGS=" -flto -fuse-ld=gold "
# export QMAKESPEC="linux-clang"
export QMAKESPEC="linux-llvm"
./configure

#******************************************************************************
# qbuild (Seq66)
#------------------------------------------------------------------------------
# vim: ts=3 sw=3 wm=4 et ft=sh
#------------------------------------------------------------------------------

4 changes: 2 additions & 2 deletions libseq66/src/ctrl/opcontainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* \library seq66 application
* \author Chris Ahlstrom
* \date 2018-11-18
* \updates 2022-05-16
* \updates 2023-12-07
* \license GNU GPLv2 or above
*
*/
Expand Down Expand Up @@ -85,7 +85,7 @@ opcontainer::add (const midioperation & op)
automation::slot opnumber = op.number();
if
(
opnumber != automation::slot::max ||
opnumber != automation::slot::max && // || re issue #124
opnumber != automation::slot::automation
)
{
Expand Down
20 changes: 10 additions & 10 deletions libseq66/src/midi/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* \library seq66 application
* \author Chris Ahlstrom
* \date 2015-07-24
* \updates 2023-09-16
* \updates 2023-12-07
* \license GNU GPLv2 or above
*
* A MIDI event (i.e. "track event") is encapsulated by the seq66::event
Expand Down Expand Up @@ -98,13 +98,13 @@ namespace seq66
*/

event::event () :
m_input_buss (null_buss()), /* 0xFF */
m_input_buss (null_buss()), /* 0xFF */
m_timestamp (0),
m_status (EVENT_NOTE_OFF), /* note-off, channel 0 */
m_channel (null_channel()), /* 0x80 */
m_data (), /* a two-element array */
m_sysex (), /* an std::vector */
m_linked (nullptr),
m_status (EVENT_NOTE_OFF), /* note-off, channel 0 */
m_channel (null_channel()), /* 0x80 */
m_data (), /* a two-element array */
m_sysex (), /* an std::vector */
m_linked (), /* uninit'd iterator #124 */
m_has_link (false),
m_selected (false),
m_marked (false),
Expand Down Expand Up @@ -139,7 +139,7 @@ event::event (midipulse tstamp, midibyte status, midibyte d0, midibyte d1) :
m_channel (mask_channel(status)),
m_data (), /* two-element array, midibytes */
m_sysex (), /* an std::vector of midibytes */
m_linked (nullptr),
m_linked (), /* removed nullptr issue #124 */
m_has_link (false),
m_selected (false),
m_marked (false),
Expand All @@ -159,7 +159,7 @@ event::event (midipulse tstamp, midibpm tempo) :
m_channel (EVENT_META_SET_TEMPO),
m_data (), /* two-element array, midibytes */
m_sysex (), /* an std::vector of midibytes */
m_linked (nullptr),
m_linked (), /* removed nullptr issue #124 */
m_has_link (false),
m_selected (false),
m_marked (false),
Expand All @@ -186,7 +186,7 @@ event::event
m_channel (channel),
m_data (), /* two-element array, midibytes */
m_sysex (), /* an std::vector of midibytes */
m_linked (nullptr),
m_linked (), /* removed nullptr issue #124 */
m_has_link (false),
m_selected (false),
m_marked (false),
Expand Down
6 changes: 2 additions & 4 deletions libseq66/src/midi/midifile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* \library seq66 application
* \author Chris Ahlstrom
* \date 2015-07-24
* \updates 2023-11-30
* \updates 2023-12-06
* \license GNU GPLv2 or above
*
* For a quick guide to the MIDI format, see, for example:
Expand Down Expand Up @@ -1542,11 +1542,9 @@ midifile::parse_smf_1 (performer & p, int screenset, bool is_smf0)
--m_pos; /* put byte back */
len = read_varinum(); /* sysex */
#if defined SEQ66_USE_SYSEX_PROCESSING
int bcount = 0;
while (len--)
while (len-- > 0)
{
midibyte b = read_byte();
++bcount;
if (! e.append_sysex_byte(b)) /* end byte? */
break;
}
Expand Down
4 changes: 2 additions & 2 deletions seq_portmidi/include/midibus_pm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* \library seq66 application
* \author Seq24 team; modifications by Chris Ahlstrom
* \date 2015-07-24
* \updates 2023-06-28
* \updates 2023-12-05
* \license GNU GPLv2 or above
*
* This midibus module is the Windows (PortMidi) version of the midibus
Expand Down Expand Up @@ -107,7 +107,7 @@ class midibus : public midibase
virtual int api_poll_for_midi () override;
virtual bool api_init_in () override;
virtual bool api_init_out () override;
virtual void api_continue_from (midipulse tick, midipulse beats);
virtual void api_continue_from (midipulse tick, midipulse beats) override;
virtual void api_start () override;
virtual void api_stop () override;
virtual void api_clock (midipulse tick) override;
Expand Down

0 comments on commit 5dcd2cc

Please sign in to comment.