quiet gcc 5 warnings

This commit is contained in:
Seth Alves 2016-05-21 16:53:01 -07:00
parent e07674134f
commit 40e862cf9e
22 changed files with 48 additions and 48 deletions

View file

@ -153,7 +153,7 @@ void OctreeInboundPacketProcessor::processPacket(QSharedPointer<ReceivedMessage>
qDebug() << " maxSize=" << maxSize; qDebug() << " maxSize=" << maxSize;
qDebug("OctreeInboundPacketProcessor::processPacket() %hhu " qDebug("OctreeInboundPacketProcessor::processPacket() %hhu "
"payload=%p payloadLength=%lld editData=%p payloadPosition=%lld maxSize=%d", "payload=%p payloadLength=%lld editData=%p payloadPosition=%lld maxSize=%d",
packetType, message->getRawMessage(), message->getSize(), editData, (int)packetType, message->getRawMessage(), message->getSize(), editData,
message->getPosition(), maxSize); message->getPosition(), maxSize);
} }
@ -191,7 +191,7 @@ void OctreeInboundPacketProcessor::processPacket(QSharedPointer<ReceivedMessage>
if (debugProcessPacket) { if (debugProcessPacket) {
qDebug("OctreeInboundPacketProcessor::processPacket() DONE LOOPING FOR %hhu " qDebug("OctreeInboundPacketProcessor::processPacket() DONE LOOPING FOR %hhu "
"payload=%p payloadLength=%lld editData=%p payloadPosition=%lld", "payload=%p payloadLength=%lld editData=%p payloadPosition=%lld",
packetType, message->getRawMessage(), message->getSize(), editData, message->getPosition()); (int)packetType, message->getRawMessage(), message->getSize(), editData, message->getPosition());
} }
// Make sure our Node and NodeList knows we've heard from this node. // Make sure our Node and NodeList knows we've heard from this node.
@ -208,7 +208,7 @@ void OctreeInboundPacketProcessor::processPacket(QSharedPointer<ReceivedMessage>
} }
trackInboundPacket(nodeUUID, sequence, transitTime, editsInPacket, processTime, lockWaitTime); trackInboundPacket(nodeUUID, sequence, transitTime, editsInPacket, processTime, lockWaitTime);
} else { } else {
qDebug("unknown packet ignored... packetType=%hhu", packetType); qDebug("unknown packet ignored... packetType=%hhu", (int)packetType);
} }
} }

View file

@ -29,6 +29,10 @@ enum CameraMode
}; };
Q_DECLARE_METATYPE(CameraMode); Q_DECLARE_METATYPE(CameraMode);
#if defined(__GNUC__) && !defined(__clang__)
__attribute__((unused))
#endif
static int cameraModeId = qRegisterMetaType<CameraMode>(); static int cameraModeId = qRegisterMetaType<CameraMode>();
class Camera : public QObject { class Camera : public QObject {

View file

@ -196,7 +196,7 @@ bool AssetMappingModel::isKnownFolder(QString path) const {
return false; return false;
} }
static int assetMappingModelMetatypeId = qRegisterMetaType<AssetMappingModel*>("AssetMappingModel*"); int assetMappingModelMetatypeId = qRegisterMetaType<AssetMappingModel*>("AssetMappingModel*");
void AssetMappingModel::refresh() { void AssetMappingModel::refresh() {
qDebug() << "Refreshing asset mapping model"; qDebug() << "Refreshing asset mapping model";

View file

@ -15,7 +15,7 @@
#include "AnimationCache.h" #include "AnimationCache.h"
#include "AnimationLogging.h" #include "AnimationLogging.h"
static int animationPointerMetaTypeId = qRegisterMetaType<AnimationPointer>(); int animationPointerMetaTypeId = qRegisterMetaType<AnimationPointer>();
AnimationCache::AnimationCache(QObject* parent) : AnimationCache::AnimationCache(QObject* parent) :
ResourceCache(parent) ResourceCache(parent)

View file

@ -14,7 +14,7 @@
#include "AudioLogging.h" #include "AudioLogging.h"
#include "SoundCache.h" #include "SoundCache.h"
static int soundPointerMetaTypeId = qRegisterMetaType<SharedSoundPointer>(); int soundPointerMetaTypeId = qRegisterMetaType<SharedSoundPointer>();
SoundCache::SoundCache(QObject* parent) : SoundCache::SoundCache(QObject* parent) :
ResourceCache(parent) ResourceCache(parent)

View file

@ -336,10 +336,10 @@ QVector<QString> UserInputMapper::getActionNames() const {
return result; return result;
} }
static int actionMetaTypeId = qRegisterMetaType<Action>(); int actionMetaTypeId = qRegisterMetaType<Action>();
static int inputMetaTypeId = qRegisterMetaType<Input>(); int inputMetaTypeId = qRegisterMetaType<Input>();
static int inputPairMetaTypeId = qRegisterMetaType<Input::NamedPair>(); int inputPairMetaTypeId = qRegisterMetaType<Input::NamedPair>();
static int poseMetaTypeId = qRegisterMetaType<controller::Pose>("Pose"); int poseMetaTypeId = qRegisterMetaType<controller::Pose>("Pose");
QScriptValue inputToScriptValue(QScriptEngine* engine, const Input& input); QScriptValue inputToScriptValue(QScriptEngine* engine, const Input& input);
void inputFromScriptValue(const QScriptValue& object, Input& input); void inputFromScriptValue(const QScriptValue& object, Input& input);

View file

@ -69,7 +69,7 @@ private:
/// named NameEntityItem and must of a static method called factory that takes an EnityItemID, and EntityItemProperties and return a newly /// named NameEntityItem and must of a static method called factory that takes an EnityItemID, and EntityItemProperties and return a newly
/// constructed (heap allocated) instance of your type. e.g. The following prototype: /// constructed (heap allocated) instance of your type. e.g. The following prototype:
// static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties); // static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
#define REGISTER_ENTITY_TYPE(x) static bool x##Registration = \ #define REGISTER_ENTITY_TYPE(x) bool x##Registration = \
EntityTypes::registerEntityType(EntityTypes::x, #x, x##EntityItem::factory); EntityTypes::registerEntityType(EntityTypes::x, #x, x##EntityItem::factory);
/// Macro for registering entity types with an overloaded factory. Like using the REGISTER_ENTITY_TYPE macro: Make sure to add /// Macro for registering entity types with an overloaded factory. Like using the REGISTER_ENTITY_TYPE macro: Make sure to add

View file

@ -39,7 +39,7 @@
using namespace std; using namespace std;
static int FBXGeometryPointerMetaTypeId = qRegisterMetaType<FBXGeometry::Pointer>(); int FBXGeometryPointerMetaTypeId = qRegisterMetaType<FBXGeometry::Pointer>();
QStringList FBXGeometry::getJointNames() const { QStringList FBXGeometry::getJointNames() const {
QStringList names; QStringList names;
@ -130,9 +130,9 @@ QString FBXGeometry::getModelNameOfMesh(int meshIndex) const {
return QString(); return QString();
} }
static int fbxGeometryMetaTypeId = qRegisterMetaType<FBXGeometry>(); int fbxGeometryMetaTypeId = qRegisterMetaType<FBXGeometry>();
static int fbxAnimationFrameMetaTypeId = qRegisterMetaType<FBXAnimationFrame>(); int fbxAnimationFrameMetaTypeId = qRegisterMetaType<FBXAnimationFrame>();
static int fbxAnimationFrameVectorMetaTypeId = qRegisterMetaType<QVector<FBXAnimationFrame> >(); int fbxAnimationFrameVectorMetaTypeId = qRegisterMetaType<QVector<FBXAnimationFrame> >();
glm::vec3 parseVec3(const QString& string) { glm::vec3 parseVec3(const QString& string) {

View file

@ -716,9 +716,9 @@ QQmlContext* OffscreenQmlSurface::getRootContext() {
} }
Q_DECLARE_METATYPE(std::function<void()>); Q_DECLARE_METATYPE(std::function<void()>);
static auto VoidLambdaType = qRegisterMetaType<std::function<void()>>(); auto VoidLambdaType = qRegisterMetaType<std::function<void()>>();
Q_DECLARE_METATYPE(std::function<QVariant()>); Q_DECLARE_METATYPE(std::function<QVariant()>);
static auto VariantLambdaType = qRegisterMetaType<std::function<QVariant()>>(); auto VariantLambdaType = qRegisterMetaType<std::function<QVariant()>>();
void OffscreenQmlSurface::executeOnUiThread(std::function<void()> function, bool blocking ) { void OffscreenQmlSurface::executeOnUiThread(std::function<void()> function, bool blocking ) {

View file

@ -33,7 +33,7 @@ using namespace gpu::gl;
static const QString DEBUG_FLAG("HIFI_ENABLE_OPENGL_45"); static const QString DEBUG_FLAG("HIFI_ENABLE_OPENGL_45");
static bool enableOpenGL45 = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG); bool enableOpenGL45 = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG);
Backend* GLBackend::createBackend() { Backend* GLBackend::createBackend() {

View file

@ -22,7 +22,7 @@
using namespace gpu; using namespace gpu;
static int TexturePointerMetaTypeId = qRegisterMetaType<TexturePointer>(); int TexturePointerMetaTypeId = qRegisterMetaType<TexturePointer>();
std::atomic<uint32_t> Texture::_textureCPUCount{ 0 }; std::atomic<uint32_t> Texture::_textureCPUCount{ 0 };
std::atomic<Texture::Size> Texture::_textureCPUMemoryUsage{ 0 }; std::atomic<Texture::Size> Texture::_textureCPUMemoryUsage{ 0 };

View file

@ -16,7 +16,7 @@
#include "HifiSockAddr.h" #include "HifiSockAddr.h"
#include "NetworkLogging.h" #include "NetworkLogging.h"
static int hifiSockAddrMetaTypeId = qRegisterMetaType<HifiSockAddr>(); int hifiSockAddrMetaTypeId = qRegisterMetaType<HifiSockAddr>();
HifiSockAddr::HifiSockAddr() : HifiSockAddr::HifiSockAddr() :
_address(), _address(),

View file

@ -22,9 +22,9 @@
const QString UNKNOWN_NodeType_t_NAME = "Unknown"; const QString UNKNOWN_NodeType_t_NAME = "Unknown";
static int NodePtrMetaTypeId = qRegisterMetaType<Node*>("Node*"); int NodePtrMetaTypeId = qRegisterMetaType<Node*>("Node*");
static int sharedPtrNodeMetaTypeId = qRegisterMetaType<QSharedPointer<Node>>("QSharedPointer<Node>"); int sharedPtrNodeMetaTypeId = qRegisterMetaType<QSharedPointer<Node>>("QSharedPointer<Node>");
static int sharedNodePtrMetaTypeId = qRegisterMetaType<SharedNodePointer>("SharedNodePointer"); int sharedNodePtrMetaTypeId = qRegisterMetaType<SharedNodePointer>("SharedNodePointer");
namespace NodeType { namespace NodeType {
QHash<NodeType_t, QString> TypeNameHash; QHash<NodeType_t, QString> TypeNameHash;

View file

@ -14,8 +14,8 @@
#include "QSharedPointer" #include "QSharedPointer"
static int receivedMessageMetaTypeId = qRegisterMetaType<ReceivedMessage*>("ReceivedMessage*"); int receivedMessageMetaTypeId = qRegisterMetaType<ReceivedMessage*>("ReceivedMessage*");
static int sharedPtrReceivedMessageMetaTypeId = qRegisterMetaType<QSharedPointer<ReceivedMessage>>("QSharedPointer<ReceivedMessage>"); int sharedPtrReceivedMessageMetaTypeId = qRegisterMetaType<QSharedPointer<ReceivedMessage>>("QSharedPointer<ReceivedMessage>");
static const int HEAD_DATA_SIZE = 512; static const int HEAD_DATA_SIZE = 512;

View file

@ -19,7 +19,7 @@
using namespace udt; using namespace udt;
static int packetMetaTypeId = qRegisterMetaType<Packet*>("Packet*"); int packetMetaTypeId = qRegisterMetaType<Packet*>("Packet*");
using Key = uint64_t; using Key = uint64_t;
static const std::array<Key, 4> KEYS {{ static const std::array<Key, 4> KEYS {{

View file

@ -18,7 +18,7 @@
Q_DECLARE_METATYPE(PacketType); Q_DECLARE_METATYPE(PacketType);
static int packetTypeMetaTypeId = qRegisterMetaType<PacketType>(); int packetTypeMetaTypeId = qRegisterMetaType<PacketType>();
const QSet<PacketType> NON_VERIFIED_PACKETS = QSet<PacketType>() const QSet<PacketType> NON_VERIFIED_PACKETS = QSet<PacketType>()
<< PacketType::NodeJsonStats << PacketType::EntityQuery << PacketType::NodeJsonStats << PacketType::EntityQuery

View file

@ -15,7 +15,7 @@
using namespace udt; using namespace udt;
static int packetListMetaTypeId = qRegisterMetaType<PacketList*>("PacketList*"); int packetListMetaTypeId = qRegisterMetaType<PacketList*>("PacketList*");
std::unique_ptr<PacketList> PacketList::create(PacketType packetType, QByteArray extendedHeader, std::unique_ptr<PacketList> PacketList::create(PacketType packetType, QByteArray extendedHeader,
bool isReliable, bool isOrdered) { bool isReliable, bool isOrdered) {

View file

@ -29,9 +29,9 @@
using namespace std; using namespace std;
static int nakedModelPointerTypeId = qRegisterMetaType<ModelPointer>(); int nakedModelPointerTypeId = qRegisterMetaType<ModelPointer>();
static int weakNetworkGeometryPointerTypeId = qRegisterMetaType<std::weak_ptr<NetworkGeometry> >(); int weakNetworkGeometryPointerTypeId = qRegisterMetaType<std::weak_ptr<NetworkGeometry> >();
static int vec3VectorTypeId = qRegisterMetaType<QVector<glm::vec3> >(); int vec3VectorTypeId = qRegisterMetaType<QVector<glm::vec3> >();
float Model::FAKE_DIMENSION_PLACEHOLDER = -1.0f; float Model::FAKE_DIMENSION_PLACEHOLDER = -1.0f;
#define HTTP_INVALID_COM "http://invalid.com" #define HTTP_INVALID_COM "http://invalid.com"

View file

@ -65,7 +65,7 @@
static const QString SCRIPT_EXCEPTION_FORMAT = "[UncaughtException] %1 in %2:%3"; static const QString SCRIPT_EXCEPTION_FORMAT = "[UncaughtException] %1 in %2:%3";
Q_DECLARE_METATYPE(QScriptEngine::FunctionSignature) Q_DECLARE_METATYPE(QScriptEngine::FunctionSignature)
static int functionSignatureMetaID = qRegisterMetaType<QScriptEngine::FunctionSignature>(); int functionSignatureMetaID = qRegisterMetaType<QScriptEngine::FunctionSignature>();
static QScriptValue debugPrint(QScriptContext* context, QScriptEngine* engine){ static QScriptValue debugPrint(QScriptContext* context, QScriptEngine* engine){
QString message = ""; QString message = "";

View file

@ -21,17 +21,17 @@
#include "RegisteredMetaTypes.h" #include "RegisteredMetaTypes.h"
static int vec4MetaTypeId = qRegisterMetaType<glm::vec4>(); int vec4MetaTypeId = qRegisterMetaType<glm::vec4>();
static int vec3MetaTypeId = qRegisterMetaType<glm::vec3>(); int vec3MetaTypeId = qRegisterMetaType<glm::vec3>();
static int qVectorVec3MetaTypeId = qRegisterMetaType<QVector<glm::vec3>>(); int qVectorVec3MetaTypeId = qRegisterMetaType<QVector<glm::vec3>>();
static int qVectorQuatMetaTypeId = qRegisterMetaType<QVector<glm::quat>>(); int qVectorQuatMetaTypeId = qRegisterMetaType<QVector<glm::quat>>();
static int qVectorBoolMetaTypeId = qRegisterMetaType<QVector<bool>>(); int qVectorBoolMetaTypeId = qRegisterMetaType<QVector<bool>>();
static int vec2MetaTypeId = qRegisterMetaType<glm::vec2>(); int vec2MetaTypeId = qRegisterMetaType<glm::vec2>();
static int quatMetaTypeId = qRegisterMetaType<glm::quat>(); int quatMetaTypeId = qRegisterMetaType<glm::quat>();
static int xColorMetaTypeId = qRegisterMetaType<xColor>(); int xColorMetaTypeId = qRegisterMetaType<xColor>();
static int pickRayMetaTypeId = qRegisterMetaType<PickRay>(); int pickRayMetaTypeId = qRegisterMetaType<PickRay>();
static int collisionMetaTypeId = qRegisterMetaType<Collision>(); int collisionMetaTypeId = qRegisterMetaType<Collision>();
static int qMapURLStringMetaTypeId = qRegisterMetaType<QMap<QUrl,QString>>(); int qMapURLStringMetaTypeId = qRegisterMetaType<QMap<QUrl,QString>>();
void registerMetaTypes(QScriptEngine* engine) { void registerMetaTypes(QScriptEngine* engine) {
qScriptRegisterMetaType(engine, mat4toScriptValue, mat4FromScriptValue); qScriptRegisterMetaType(engine, mat4toScriptValue, mat4FromScriptValue);

View file

@ -57,7 +57,7 @@ public:
void addSample(T sample) { void addSample(T sample) {
if (numSamples > 0) { if (numSamples > 0) {
average = (sample * WEIGHTING) + (average * ONE_MINUS_WEIGHTING); average = ((float)sample * WEIGHTING) + ((float)average * ONE_MINUS_WEIGHTING);
} else { } else {
average = sample; average = sample;
} }

View file

@ -157,10 +157,6 @@ protected:
//static const wchar_t* EXAMPLE_TEXT = L"\xC1y Hello 1.0\ny\xC1 line 2\n\xC1y"; //static const wchar_t* EXAMPLE_TEXT = L"\xC1y Hello 1.0\ny\xC1 line 2\n\xC1y";
static const glm::uvec2 QUAD_OFFSET(10, 10); static const glm::uvec2 QUAD_OFFSET(10, 10);
static const glm::vec3 COLORS[4] = { { 1.0, 1.0, 1.0 }, { 0.5, 1.0, 0.5 }, {
1.0, 0.5, 0.5 }, { 0.5, 0.5, 1.0 } };
void testShaderBuild(const char* vs_src, const char * fs_src) { void testShaderBuild(const char* vs_src, const char * fs_src) {
auto vs = gpu::Shader::createVertex(std::string(vs_src)); auto vs = gpu::Shader::createVertex(std::string(vs_src));
auto fs = gpu::Shader::createPixel(std::string(fs_src)); auto fs = gpu::Shader::createPixel(std::string(fs_src));