mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
fix warnings if some want to use c++11
This commit is contained in:
@@ -656,7 +656,7 @@ int CLuaInstance::GetInput(lua_State *L)
|
|||||||
/* TODO: I'm not sure if this works... */
|
/* TODO: I'm not sure if this works... */
|
||||||
if (msg != CRCInput::RC_timeout && msg > CRCInput::RC_MaxRC)
|
if (msg != CRCInput::RC_timeout && msg > CRCInput::RC_MaxRC)
|
||||||
{
|
{
|
||||||
DBG("CLuaInstance::%s: msg 0x%08"PRIx32" data 0x%08"PRIx32"\n", __func__, msg, data);
|
DBG("CLuaInstance::%s: msg 0x%08" PRIx32 " data 0x%08" PRIx32 "\n", __func__, msg, data);
|
||||||
CNeutrinoApp::getInstance()->handleMsg(msg, data);
|
CNeutrinoApp::getInstance()->handleMsg(msg, data);
|
||||||
}
|
}
|
||||||
/* signed int is debatable, but the "big" messages can't yet be handled
|
/* signed int is debatable, but the "big" messages can't yet be handled
|
||||||
|
@@ -603,6 +603,6 @@ void CMotorControl::readNetwork()
|
|||||||
network = "unknown";
|
network = "unknown";
|
||||||
|
|
||||||
char net[100];
|
char net[100];
|
||||||
snprintf(net, sizeof(net), "%03d.%d, %s", abs(pos)/10, abs(pos)%10, network.c_str());
|
snprintf(net, sizeof(net), "%03d.%d, %s", abs((int)pos)/10, abs((int)pos)%10, network.c_str());
|
||||||
network = net;
|
network = net;
|
||||||
}
|
}
|
||||||
|
@@ -121,23 +121,23 @@ bool CMovieInfo::convertTs2XmlName(std::string * filename)
|
|||||||
|
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
#define XML_ADD_TAG_STRING(_xml_text_,_tag_name_,_tag_content_){ \
|
#define XML_ADD_TAG_STRING(_xml_text_,_tag_name_,_tag_content_){ \
|
||||||
_xml_text_ += "\t\t<"_tag_name_">"; \
|
_xml_text_ += "\t\t<" _tag_name_ ">"; \
|
||||||
_xml_text_ += ZapitTools::UTF8_to_UTF8XML(_tag_content_.c_str()); \
|
_xml_text_ += ZapitTools::UTF8_to_UTF8XML(_tag_content_.c_str()); \
|
||||||
_xml_text_ += "</"_tag_name_">\n";}
|
_xml_text_ += "</" _tag_name_ ">\n";}
|
||||||
|
|
||||||
#define XML_ADD_TAG_UNSIGNED(_xml_text_,_tag_name_,_tag_content_){\
|
#define XML_ADD_TAG_UNSIGNED(_xml_text_,_tag_name_,_tag_content_){\
|
||||||
_xml_text_ += "\t\t<"_tag_name_">";\
|
_xml_text_ += "\t\t<" _tag_name_ ">";\
|
||||||
char _tmp_[50];\
|
char _tmp_[50];\
|
||||||
sprintf(_tmp_, "%u", (unsigned int) _tag_content_);\
|
sprintf(_tmp_, "%u", (unsigned int) _tag_content_);\
|
||||||
_xml_text_ += _tmp_;\
|
_xml_text_ += _tmp_;\
|
||||||
_xml_text_ += "</"_tag_name_">\n";}
|
_xml_text_ += "</" _tag_name_ ">\n";}
|
||||||
|
|
||||||
#define XML_ADD_TAG_LONG(_xml_text_,_tag_name_,_tag_content_){\
|
#define XML_ADD_TAG_LONG(_xml_text_,_tag_name_,_tag_content_){\
|
||||||
_xml_text_ += "\t\t<"_tag_name_">";\
|
_xml_text_ += "\t\t<" _tag_name_ ">";\
|
||||||
char _tmp_[50];\
|
char _tmp_[50];\
|
||||||
sprintf(_tmp_, "%" PRIu64 "", (uint64_t)_tag_content_);\
|
sprintf(_tmp_, "%" PRIu64 "", (uint64_t)_tag_content_);\
|
||||||
_xml_text_ += _tmp_;\
|
_xml_text_ += _tmp_;\
|
||||||
_xml_text_ += "</"_tag_name_">\n";}
|
_xml_text_ += "</" _tag_name_ ">\n";}
|
||||||
|
|
||||||
#define XML_GET_DATA_STRING(_node_,_tag_,_string_dest_){\
|
#define XML_GET_DATA_STRING(_node_,_tag_,_string_dest_){\
|
||||||
if(!strcmp(_node_->GetType(), _tag_))\
|
if(!strcmp(_node_->GetType(), _tag_))\
|
||||||
|
@@ -304,7 +304,7 @@ std::string CNeutrinoYParser::func_get_channels_as_dropdown(CyhookHandler *, st
|
|||||||
std::string _sid = std::string(id);
|
std::string _sid = std::string(id);
|
||||||
sel = (_sid == achannel_id) ? "selected=\"selected\"" : "";
|
sel = (_sid == achannel_id) ? "selected=\"selected\"" : "";
|
||||||
CEitManager::getInstance()->getActualEPGServiceKey(channel->channel_id, &epg);
|
CEitManager::getInstance()->getActualEPGServiceKey(channel->channel_id, &epg);
|
||||||
sprintf(buf,"<option value="PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS" %s>%.20s - %.30s</option>\n", channel->channel_id, sel.c_str(), channel->getName().c_str(),epg.title.c_str());
|
sprintf(buf,"<option value=" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " %s>%.20s - %.30s</option>\n", channel->channel_id, sel.c_str(), channel->getName().c_str(),epg.title.c_str());
|
||||||
yresult += buf;
|
yresult += buf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -55,8 +55,8 @@ extern "C" {
|
|||||||
#define PRIxoff_t PRIx64
|
#define PRIxoff_t PRIx64
|
||||||
#define PRIdoff_t PRId64
|
#define PRIdoff_t PRId64
|
||||||
#else
|
#else
|
||||||
#define PRIxoff_t "l"PRIx32
|
#define PRIxoff_t "l" PRIx32
|
||||||
#define PRIdoff_t "l"PRId32
|
#define PRIdoff_t "l" PRId32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Verbose messages */
|
/* Verbose messages */
|
||||||
|
@@ -1063,7 +1063,7 @@ int mtd_read(const struct mtd_dev_info *mtd, int fd, int eb, int offs,
|
|||||||
/* Seek to the beginning of the eraseblock */
|
/* Seek to the beginning of the eraseblock */
|
||||||
seek = (off_t)eb * mtd->eb_size + offs;
|
seek = (off_t)eb * mtd->eb_size + offs;
|
||||||
if (lseek(fd, seek, SEEK_SET) != seek)
|
if (lseek(fd, seek, SEEK_SET) != seek)
|
||||||
return sys_errmsg("cannot seek mtd%d to offset %"PRIdoff_t,
|
return sys_errmsg("cannot seek mtd%d to offset %" PRIdoff_t,
|
||||||
mtd->mtd_num, seek);
|
mtd->mtd_num, seek);
|
||||||
|
|
||||||
while (rd < len) {
|
while (rd < len) {
|
||||||
@@ -1173,7 +1173,7 @@ int mtd_write(libmtd_t desc, const struct mtd_dev_info *mtd, int fd, int eb,
|
|||||||
if (data) {
|
if (data) {
|
||||||
/* Seek to the beginning of the eraseblock */
|
/* Seek to the beginning of the eraseblock */
|
||||||
if (lseek(fd, seek, SEEK_SET) != seek)
|
if (lseek(fd, seek, SEEK_SET) != seek)
|
||||||
return sys_errmsg("cannot seek mtd%d to offset %"PRIdoff_t,
|
return sys_errmsg("cannot seek mtd%d to offset %" PRIdoff_t,
|
||||||
mtd->mtd_num, seek);
|
mtd->mtd_num, seek);
|
||||||
ret = write(fd, data, len);
|
ret = write(fd, data, len);
|
||||||
if (ret != len)
|
if (ret != len)
|
||||||
@@ -1331,7 +1331,7 @@ int mtd_write_img(const struct mtd_dev_info *mtd, int fd, int eb, int offs,
|
|||||||
/* Seek to the beginning of the eraseblock */
|
/* Seek to the beginning of the eraseblock */
|
||||||
seek = (off_t)eb * mtd->eb_size + offs;
|
seek = (off_t)eb * mtd->eb_size + offs;
|
||||||
if (lseek(fd, seek, SEEK_SET) != seek) {
|
if (lseek(fd, seek, SEEK_SET) != seek) {
|
||||||
sys_errmsg("cannot seek mtd%d to offset %"PRIdoff_t,
|
sys_errmsg("cannot seek mtd%d to offset %" PRIdoff_t,
|
||||||
mtd->mtd_num, seek);
|
mtd->mtd_num, seek);
|
||||||
goto out_close;
|
goto out_close;
|
||||||
}
|
}
|
||||||
|
@@ -466,7 +466,7 @@ bool CServiceScan::ParseFst(unsigned short pid, fast_scan_operator_t * op)
|
|||||||
|
|
||||||
char pname[100];
|
char pname[100];
|
||||||
if (frontend->getInfo()->type == FE_QPSK)
|
if (frontend->getInfo()->type == FE_QPSK)
|
||||||
snprintf(pname, 100, "[%c%03d.%d] %s", satellitePosition > 0? 'E' : 'W', abs(satellitePosition)/10, abs(satellitePosition)%10, providerName.c_str());
|
snprintf(pname, 100, "[%c%03d.%d] %s", satellitePosition > 0? 'E' : 'W', abs((int)satellitePosition)/10, abs((int)satellitePosition)%10, providerName.c_str());
|
||||||
else
|
else
|
||||||
snprintf(pname, 100, "%s", providerName.c_str());
|
snprintf(pname, 100, "%s", providerName.c_str());
|
||||||
|
|
||||||
|
@@ -412,7 +412,7 @@ bool CSdt::AddToBouquet(std::string &providerName, CZapitChannel *channel)
|
|||||||
char pname[100];
|
char pname[100];
|
||||||
if (!cable)
|
if (!cable)
|
||||||
snprintf(pname, 100, "[%c%03d.%d] %s", satellitePosition > 0? 'E' : 'W',
|
snprintf(pname, 100, "[%c%03d.%d] %s", satellitePosition > 0? 'E' : 'W',
|
||||||
abs(satellitePosition)/10, abs(satellitePosition)%10, providerName.c_str());
|
abs((int)satellitePosition)/10, abs((int)satellitePosition)%10, providerName.c_str());
|
||||||
else
|
else
|
||||||
snprintf(pname, 100, "%s", providerName.c_str());
|
snprintf(pname, 100, "%s", providerName.c_str());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user