repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2ffc8cd
)
cec: silence all 'unused' compiler warnings
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Tue, 10 Jan 2012 09:15:16 +0000
(10:15 +0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Tue, 10 Jan 2012 09:15:16 +0000
(10:15 +0100)
include/cectypes.h
patch
|
blob
|
blame
|
history
src/lib/AdapterCommunication.cpp
patch
|
blob
|
blame
|
history
src/lib/AdapterDetection.cpp
patch
|
blob
|
blame
|
history
src/lib/CECProcessor.cpp
patch
|
blob
|
blame
|
history
src/lib/implementations/CECCommandHandler.cpp
patch
|
blob
|
blame
|
history
src/lib/implementations/CECCommandHandler.h
patch
|
blob
|
blame
|
history
src/testclient/main.cpp
patch
|
blob
|
blame
|
history
diff --git
a/include/cectypes.h
b/include/cectypes.h
index f2b2f02b3c9c49fc4060474833ef792fdc49a7f7..ab4dcd862de8faeb5ed264fe81bb1b55405851a0 100644
(file)
--- a/
include/cectypes.h
+++ b/
include/cectypes.h
@@
-864,6
+864,15
@@
typedef struct cec_logical_addresses
#endif
} cec_logical_addresses;
#endif
} cec_logical_addresses;
+#ifdef UNUSED
+#elif defined(__GNUC__)
+#define UNUSED(x) UNUSED_ ## x __attribute__((unused))
+#elif defined(__LCLINT__)
+#define UNUSED(x) /*@unused@*/ x
+#else
+#define UNUSED(x) x
+#endif
+
#ifdef __cplusplus
};
};
#ifdef __cplusplus
};
};
diff --git
a/src/lib/AdapterCommunication.cpp
b/src/lib/AdapterCommunication.cpp
index 54077d6ed776b4b6ef72f0dcc0d76cffd948ab45..93648742825ce3f089013615d119afae827bf114 100644
(file)
--- a/
src/lib/AdapterCommunication.cpp
+++ b/
src/lib/AdapterCommunication.cpp
@@
-302,6
+302,9
@@
bool CAdapterCommunication::Open(const char *strPort, uint16_t iBaudRate /* = 38
m_processor->AddLog(CEC_LOG_DEBUG, "could not create a communication thread");
}
m_processor->AddLog(CEC_LOG_DEBUG, "could not create a communication thread");
}
+ //TODO implement the timeout. use the variable for now to silence the compiler warning
+ iTimeoutMs = 0;
+
return false;
}
return false;
}
diff --git
a/src/lib/AdapterDetection.cpp
b/src/lib/AdapterDetection.cpp
index de1da7c1f3fb2c435d1fbc6f255ec0a9b86eb192..f06809975abc49300558e06780b4445633f6dd6c 100644
(file)
--- a/
src/lib/AdapterDetection.cpp
+++ b/
src/lib/AdapterDetection.cpp
@@
-324,5
+324,7
@@
uint8_t CAdapterDetection::FindAdapters(cec_adapter *deviceList, uint8_t iBufSiz
}
#endif
}
#endif
+ iBufSize = 0; /* silence "unused" warning on linux/osx */
+
return iFound;
}
return iFound;
}
diff --git
a/src/lib/CECProcessor.cpp
b/src/lib/CECProcessor.cpp
index 5071ec6ee3f8b87818b8f5733694fedf030126d2..68e8fbf8ff9e2e4777054401f2b44d4aa53b496d 100644
(file)
--- a/
src/lib/CECProcessor.cpp
+++ b/
src/lib/CECProcessor.cpp
@@
-1397,7
+1397,7
@@
const char *CCECProcessor::ToString(const cec_system_audio_status mode)
}
}
}
}
-const char *CCECProcessor::ToString(const cec_audio_status
status
)
+const char *CCECProcessor::ToString(const cec_audio_status
UNUSED(status)
)
{
// TODO this is a mask
return "TODO";
{
// TODO this is a mask
return "TODO";
diff --git
a/src/lib/implementations/CECCommandHandler.cpp
b/src/lib/implementations/CECCommandHandler.cpp
index 40b4f07ecda8755a9065b49c18a3c87327c9bfaa..bed4ff9fbb33eac6d48be69a8b46673016fd1b25 100644
(file)
--- a/
src/lib/implementations/CECCommandHandler.cpp
+++ b/
src/lib/implementations/CECCommandHandler.cpp
@@
-639,6
+639,11
@@
bool CCECCommandHandler::HandleUserControlRelease(const cec_command &command)
return true;
}
return true;
}
+bool CCECCommandHandler::HandleVendorCommand(const cec_command & UNUSED(command))
+{
+ return true;
+}
+
void CCECCommandHandler::UnhandledCommand(const cec_command &command)
{
CStdString strLog;
void CCECCommandHandler::UnhandledCommand(const cec_command &command)
{
CStdString strLog;
diff --git
a/src/lib/implementations/CECCommandHandler.h
b/src/lib/implementations/CECCommandHandler.h
index 0e3602d9871a5cecaa929cb21110cacdc472ec9f..71baddeffcf251d4cdc00f663be3110a537a162d 100644
(file)
--- a/
src/lib/implementations/CECCommandHandler.h
+++ b/
src/lib/implementations/CECCommandHandler.h
@@
-122,7
+122,7
@@
namespace CEC
virtual bool HandleTextViewOn(const cec_command &command);
virtual bool HandleUserControlPressed(const cec_command &command);
virtual bool HandleUserControlRelease(const cec_command &command);
virtual bool HandleTextViewOn(const cec_command &command);
virtual bool HandleUserControlPressed(const cec_command &command);
virtual bool HandleUserControlRelease(const cec_command &command);
- virtual bool HandleVendorCommand(const cec_command &command)
{ return true; }
+ virtual bool HandleVendorCommand(const cec_command &command)
;
virtual void UnhandledCommand(const cec_command &command);
virtual unsigned int GetMyDevices(std::vector<CCECBusDevice *> &devices) const;
virtual void UnhandledCommand(const cec_command &command);
virtual unsigned int GetMyDevices(std::vector<CCECBusDevice *> &devices) const;
diff --git
a/src/testclient/main.cpp
b/src/testclient/main.cpp
index 9a0bf3a6130c9c7466f72945f96e2c0c010fe9fa..953b6b19bf3b53773d634899688ad5d9ae2df705 100644
(file)
--- a/
src/testclient/main.cpp
+++ b/
src/testclient/main.cpp
@@
-423,7
+423,7
@@
bool ProcessCommandOSD(ICECAdapter *parser, const string &command, string &argum
return false;
}
return false;
}
-bool ProcessCommandAS(ICECAdapter *parser, const string &command, string &
arguments
)
+bool ProcessCommandAS(ICECAdapter *parser, const string &command, string &
UNUSED(arguments)
)
{
if (command == "as")
{
{
if (command == "as")
{
@@
-435,7
+435,7
@@
bool ProcessCommandAS(ICECAdapter *parser, const string &command, string &argume
}
}
-bool ProcessCommandPING(ICECAdapter *parser, const string &command, string &
arguments
)
+bool ProcessCommandPING(ICECAdapter *parser, const string &command, string &
UNUSED(arguments)
)
{
if (command == "ping")
{
{
if (command == "ping")
{
@@
-446,7
+446,7
@@
bool ProcessCommandPING(ICECAdapter *parser, const string &command, string &argu
return false;
}
return false;
}
-bool ProcessCommandVOLUP(ICECAdapter *parser, const string &command, string &
arguments
)
+bool ProcessCommandVOLUP(ICECAdapter *parser, const string &command, string &
UNUSED(arguments)
)
{
if (command == "volup")
{
{
if (command == "volup")
{
@@
-459,7
+459,7
@@
bool ProcessCommandVOLUP(ICECAdapter *parser, const string &command, string &arg
return false;
}
return false;
}
-bool ProcessCommandVOLDOWN(ICECAdapter *parser, const string &command, string &
arguments
)
+bool ProcessCommandVOLDOWN(ICECAdapter *parser, const string &command, string &
UNUSED(arguments)
)
{
if (command == "voldown")
{
{
if (command == "voldown")
{
@@
-472,7
+472,7
@@
bool ProcessCommandVOLDOWN(ICECAdapter *parser, const string &command, string &a
return false;
}
return false;
}
-bool ProcessCommandMUTE(ICECAdapter *parser, const string &command, string &
arguments
)
+bool ProcessCommandMUTE(ICECAdapter *parser, const string &command, string &
UNUSED(arguments)
)
{
if (command == "mute")
{
{
if (command == "mute")
{
@@
-500,7
+500,7
@@
bool ProcessCommandMON(ICECAdapter *parser, const string &command, string &argum
return false;
}
return false;
}
-bool ProcessCommandBL(ICECAdapter *parser, const string &command, string &
arguments
)
+bool ProcessCommandBL(ICECAdapter *parser, const string &command, string &
UNUSED(arguments)
)
{
if (command == "bl")
{
{
if (command == "bl")
{
@@
-619,7
+619,7
@@
bool ProcessCommandNAME(ICECAdapter *parser, const string &command, string &argu
return false;
}
return false;
}
-bool ProcessCommandLAD(ICECAdapter *parser, const string &command, string &
arguments
)
+bool ProcessCommandLAD(ICECAdapter *parser, const string &command, string &
UNUSED(arguments)
)
{
if (command == "lad")
{
{
if (command == "lad")
{
@@
-674,7
+674,7
@@
bool ProcessCommandAT(ICECAdapter *parser, const string &command, string &argume
return false;
}
return false;
}
-bool ProcessCommandR(ICECAdapter *parser, const string &command, string &
arguments
)
+bool ProcessCommandR(ICECAdapter *parser, const string &command, string &
UNUSED(arguments)
)
{
if (command == "r")
{
{
if (command == "r")
{
@@
-694,7
+694,7
@@
bool ProcessCommandR(ICECAdapter *parser, const string &command, string &argumen
return false;
}
return false;
}
-bool ProcessCommandH(ICECAdapter *
parser, const string &command, string &arguments
)
+bool ProcessCommandH(ICECAdapter *
UNUSED(parser), const string &command, string & UNUSED(arguments)
)
{
if (command == "h" || command == "help")
{
{
if (command == "h" || command == "help")
{
@@
-705,7
+705,7
@@
bool ProcessCommandH(ICECAdapter *parser, const string &command, string &argumen
return false;
}
return false;
}
-bool ProcessCommandLOG(ICECAdapter *
parser
, const string &command, string &arguments)
+bool ProcessCommandLOG(ICECAdapter *
UNUSED(parser)
, const string &command, string &arguments)
{
if (command == "log")
{
{
if (command == "log")
{
@@
-725,7
+725,7
@@
bool ProcessCommandLOG(ICECAdapter *parser, const string &command, string &argum
return false;
}
return false;
}
-bool ProcessCommandSCAN(ICECAdapter *parser, const string &command, string &
arguments
)
+bool ProcessCommandSCAN(ICECAdapter *parser, const string &command, string &
UNUSED(arguments)
)
{
if (command == "scan")
{
{
if (command == "scan")
{