diff options
author | horchi <vdr@jwendel.de> | 2018-10-03 16:01:10 +0200 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2018-10-03 16:01:10 +0200 |
commit | e8781e497a86af36db0aa595f8322f2947815fc3 (patch) | |
tree | d68640c50f9c971f341a7ea1fde0ddf658ded71a | |
parent | 3cb6966a65b0102f9016c0c6c9ed33dfe5fee913 (diff) | |
download | vdr-epg-daemon-e8781e497a86af36db0aa595f8322f2947815fc3.tar.gz vdr-epg-daemon-e8781e497a86af36db0aa595f8322f2947815fc3.tar.bz2 |
mor compiler warnings
-rw-r--r-- | httpd.c | 2 | ||||
-rwxr-xr-x | scripts/epgd-dropall | 6 | ||||
-rw-r--r-- | tvdbmanager.c | 4 | ||||
-rw-r--r-- | webauth.c | 3 | ||||
-rw-r--r-- | webdo.c | 2 |
5 files changed, 9 insertions, 8 deletions
@@ -1617,7 +1617,7 @@ int cEpgHttpd::performHttpGet(MHD_Connection* tcp, const char* inurl, MemoryStru { const char* encoding = MHD_lookup_connection_value(tcp, MHD_HEADER_KIND, "Accept-Encoding"); - sprintf(data->name, "%.*s", (int)sizeof(data->name), url); + sprintf(data->name, "%.*s", (int)sizeof(data->name)-1, url); if (encoding && strstr(encoding, "gzip")) { diff --git a/scripts/epgd-dropall b/scripts/epgd-dropall index 2e3910d..5ebfe47 100755 --- a/scripts/epgd-dropall +++ b/scripts/epgd-dropall @@ -141,13 +141,13 @@ if [ "${i}" = "y" ]; then echo "Table parameters dumped to ./parameters-dump.sql.gz" mysqldump --opt -u epg2vdr epg2vdr users | gzip > ./users-dump.sql.gz - echo "Table parameters dumped to ./users-dump.sql.gz" + echo "Table users dumped to ./users-dump.sql.gz" mysqldump --opt -u epg2vdr epg2vdr timersdone | gzip > ./timersdone-sump.sql.gz - echo "Table parameters dumped to ./timersdone-dump.sql.gz" + echo "Table timersdone dumped to ./timersdone-dump.sql.gz" mysqldump --opt -u epg2vdr epg2vdr searchtimers | gzip > ./searchtimers-sump.sql.gz - echo "Table parameters dumped to ./searchtimers-dump.sql.gz" + echo "Table searchtimers dumped to ./searchtimers-dump.sql.gz" fi mysql -u epg2vdr -Depg2vdr -e 'drop table if exists parameters;' diff --git a/tvdbmanager.c b/tvdbmanager.c index 5f59ec0..7020444 100644 --- a/tvdbmanager.c +++ b/tvdbmanager.c @@ -130,8 +130,8 @@ void cTVDBManager::UpdateSeries(void) { set_intersection(updatedEpisodes.begin(), updatedEpisodes.end(), storedEpisodes.begin(), storedEpisodes.end(), std::inserter(scrapEpisodeIDs, scrapEpisodeIDs.begin())); - tell(0, "%" PRIuMAX " updated Series, %" PRIuMAX "updatedEpisodes", updatedSeries.size(), updatedEpisodes.size()); - tell(0, "%" PRIuMAX " series to update in db, %" PRIuMAX " episodes to update in db", scrapSeriesIDs.size(), scrapEpisodeIDs.size()); + tell(0, "%d updated Series, %d updatedEpisodes", (int)updatedSeries.size(), (int)updatedEpisodes.size()); + tell(0, "%d series to update in db, %d episodes to update in db", (int)scrapSeriesIDs.size(), (int)scrapEpisodeIDs.size()); int seriesCur = 1; for (set<int>::iterator it = scrapSeriesIDs.begin(); !cEpgd::doShutDown() && it != scrapSeriesIDs.end(); it++) { if (seriesCur % 10 == 0) @@ -44,7 +44,8 @@ char* string2base64(const char* message) } if (length % 3) - strncat(tmp, "===", 3 - length % 3); + sprintf(tmp+strlen(tmp), "%.*s", (int)(3 - length % 3), "==="); + // strncat(tmp, "===", 3 - length % 3); return tmp; } @@ -587,7 +587,7 @@ int cEpgHttpd::doChannelLogo(MHD_Connection* tcp, json_t* obj, MemoryStruct* dat if (strcasecmp(suffixOf(path), "svg") == 0) { if (loadFromFile(path, data) == success) - sprintf(data->name, "%.*s", (int)sizeof(data->name), path); + sprintf(data->name, "%.*s", (int)sizeof(data->name)-1, path); } else { |