Clang void with wildcardb reference

sossego

Retired from the forums
Code:
In file included from /usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDevice.cpp:52:
/usr/home/raspycat/traverso/work/traverso-0.49.2/src/common/Tsar.h:66:9: error: field has incomplete type 'void *[]'
        void*           _a[];
                        ^
1 warning and 1 error generated.
*** Error code 1
Where would I find references to replacing the occurrence with the proper value? As usual, I will research a bit myself.

Thanks muchly.
 
Code:
/*
Copyright (C) 2006 Remon Sijrier 

This file is part of Traverso

Traverso is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.

$Id: Tsar.h,v 1.4 2008/02/11 10:11:52 r_sijrier Exp $
*/

#ifndef TSAR_H
#define TSAR_H

#include <QObject>
#include <QTimer>
#include <QByteArray>
#include "RingBufferNPT.h"

#define THREAD_SAVE_INVOKE(caller, argument, slotSignature)  { \
		TsarEvent event = tsar().create_event(caller, argument, #slotSignature, ""); \
		while (!tsar().add_event(event)) { printf("THREAD_SAVE_INVOKE: failed to add event, trying again\n");} \
	}

#define RT_THREAD_EMIT(cal, arg, signalSignature) {\
	TsarEvent event; \
	event.caller = cal; \
	event.argument = arg; \
	event.slotindex = -1; \
	static int retrievedsignalindex; \
	\
	if ( ! retrievedsignalindex ) { \
		/* the signal index seems to have an offset of 4, so we have to substract 4 from */ \
		/* the value returned by caller->metaObject()->indexOfMethod*/  \
		retrievedsignalindex = cal->metaObject()->indexOfMethod(#signalSignature) - 4; \
		Q_ASSERT(retrievedsignalindex >= 0); \
	} \
	event.signalindex = retrievedsignalindex; \
	event.valid = true; \
	tsar().add_rt_event(event); \
}\


#define THREAD_SAVE_INVOKE_AND_EMIT_SIGNAL(caller, argument, slotSignature, signalSignature)  { \
	TsarEvent event = tsar().create_event(caller, argument, #slotSignature, #signalSignature); \
	tsar().add_event(event);\
	}\


struct TsarEvent {
// used for slot invokation stuff
	QObject* 	caller;
	void*		argument;
	int		slotindex;
	void*		_a[];

// Used for the signal emiting stuff
	int signalindex;
	
	bool valid;
};

class Tsar : public QObject
{
	Q_OBJECT

public:
	TsarEvent create_event(QObject* caller, void* argument, const char* slotSignature, const char* signalSignature);
	
	bool add_event(TsarEvent& event);
	void add_rt_event(TsarEvent& event);
	void process_event_slot(const TsarEvent& event);
	void process_event_signal(const TsarEvent& event);
	void process_event_slot_signal(const TsarEvent& event);

private:
	Tsar();
	~Tsar();
	Tsar(const Tsar&);

	// allow this function to create one instance
	friend Tsar& tsar();
	// The AudioDevice instance is the _only_ one who
	// is allowed to call process_events() !!
	friend class AudioDevice;

	QList<RingBufferNPT<TsarEvent>*>	m_events;
	RingBufferNPT<TsarEvent>*		oldEvents;
	QTimer	finishOldEventsTimer;
	int 	m_eventCounter;
	int 	m_retryCount;

#if defined (THREAD_CHECK)
	unsigned long	m_threadId;
#endif

	void process_events();

private slots:
	void finish_processed_events();
	
};

// use this function to access the context pointer
Tsar& tsar();

#endif


//eof

There is the code.
 
Code:
[  1%] Building CXX object src/engine/CMakeFiles/traversoaudiobackend.dir/AudioDevice.o
In file included from /usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDevice.cpp:27:
/usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AlsaDriver.h:62:6: warning: 'AlsaDriver::setup' hides overloaded virtual function [-Woverloaded-virtual]
        int setup(bool capture=true, bool playback=true, const QString& pcmName="hw:0", const QString& dither="None");
            ^
/usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/Driver.h:49:14: note: hidden overloaded virtual function 'Driver::setup' declared here: different number of parameters (3 vs 4)
        virtual int setup(bool capture=true, bool playback=true, const QString& cardDevice="none");
                    ^
In file included from /usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDevice.cpp:52:
/usr/home/raspycat/traverso/work/traverso-0.49.2/src/common/Tsar.h:66:9: error: field has incomplete type 'void *[]'
        void*           _a[];

Multiple errors here and there show that I need to look this code over again.

I see this:: http://stackoverflow.com/questions/1851 ... g-by-clang with the last entry.
Would I enable this by adding it to the code of each file?
 
  1. Off topic:: How do I correct the spelling error in the title?
  2. What is then proper syntax for the preprocessor and processor flags in the Makefile? Is it
    Code:
    C_FLAGS=
    and
    Code:
    CXX_FLAGS=
    or some other value?
  3. I realize that this refers to a port and not userland; however, I was not sure as to where a CLang referenced post would be set.
    My apologies.
 
Back
Top