Browse Source

Fix the last warnings with gcc7

tags/1.9.8
falkTX 7 years ago
parent
commit
843933bb35
3 changed files with 9 additions and 3 deletions
  1. +4
    -0
      source/libjack/libjack_metadata.cpp
  2. +3
    -3
      source/libjack/ringbuffer.c
  3. +2
    -0
      source/theme/CarlaStyle.cpp

+ 4
- 0
source/libjack/libjack_metadata.cpp View File

@@ -149,6 +149,10 @@ int jack_uuid_parse(const char*, jack_uuid_t*)
CARLA_EXPORT CARLA_EXPORT
void jack_uuid_unparse(jack_uuid_t, char buf[JACK_UUID_STRING_SIZE]) void jack_uuid_unparse(jack_uuid_t, char buf[JACK_UUID_STRING_SIZE])
{ {
return;

// unused
(void)buf;
} }


CARLA_EXPORT CARLA_EXPORT


+ 3
- 3
source/libjack/ringbuffer.c View File

@@ -67,16 +67,16 @@ size_t jack_ringbuffer_write_space(const jack_ringbuffer_t *rb);
CARLA_EXPORT jack_ringbuffer_t * CARLA_EXPORT jack_ringbuffer_t *
jack_ringbuffer_create (size_t sz) jack_ringbuffer_create (size_t sz)
{ {
int power_of_two;
unsigned int power_of_two;
jack_ringbuffer_t *rb; jack_ringbuffer_t *rb;


if ((rb = (jack_ringbuffer_t *) malloc (sizeof (jack_ringbuffer_t))) == NULL) { if ((rb = (jack_ringbuffer_t *) malloc (sizeof (jack_ringbuffer_t))) == NULL) {
return NULL; return NULL;
} }


for (power_of_two = 1; 1 << power_of_two < sz; power_of_two++);
for (power_of_two = 1U; 1U << power_of_two < sz; power_of_two++);


rb->size = 1 << power_of_two;
rb->size = 1U << power_of_two;
rb->size_mask = rb->size; rb->size_mask = rb->size;
rb->size_mask -= 1; rb->size_mask -= 1;
rb->write_ptr = 0; rb->write_ptr = 0;


+ 2
- 0
source/theme/CarlaStyle.cpp View File

@@ -36,6 +36,8 @@
# include <QtWidgets/QSpinBox> # include <QtWidgets/QSpinBox>
# include <QtWidgets/QSplitter> # include <QtWidgets/QSplitter>
# include <QtWidgets/QWizard> # include <QtWidgets/QWizard>
# define QStyleOptionFrameV3 QStyleOptionFrame
# define QStyleOptionProgressBarV2 QStyleOptionProgressBar
#else #else
# include <QtGui/QApplication> # include <QtGui/QApplication>
# include <QtGui/QComboBox> # include <QtGui/QComboBox>


Loading…
Cancel
Save