Module: sems Branch: master Commit: e9b03ccbdf69c2e98c400b1eb6a0ab35881e2694 URL: https://github.com/sems-server/sems/commit/e9b03ccbdf69c2e98c400b1eb6a0ab35881e2694
Author: Mikko Lehto <[email protected]> Committer: Mikko Lehto <[email protected]> Date: 2015-06-11T15:45:08+03:00 core: fixes compile warnings on FreeBSD with clang++ --- Modified: core/AmConfig.cpp Modified: core/AmUtils.cpp Modified: core/sip/pcap_logger.cpp --- Diff: https://github.com/sems-server/sems/commit/e9b03ccbdf69c2e98c400b1eb6a0ab35881e2694.diff Patch: https://github.com/sems-server/sems/commit/e9b03ccbdf69c2e98c400b1eb6a0ab35881e2694.patch --- diff --git a/core/AmConfig.cpp b/core/AmConfig.cpp index bb780b9..16b72a8 100644 --- a/core/AmConfig.cpp +++ b/core/AmConfig.cpp @@ -632,7 +632,7 @@ int AmConfig::readConfiguration() } if(cfg.hasParameter("cps_limit")){ - unsigned int CPSLimit; + unsigned int CPSLimit = 0; vector<string> limit = explode(cfg.getParameter("cps_limit"), ";"); if (limit.size() != 3) { ERROR("invalid cps_limit specified.\n"); diff --git a/core/AmUtils.cpp b/core/AmUtils.cpp index 7377785..4a0a678 100644 --- a/core/AmUtils.cpp +++ b/core/AmUtils.cpp @@ -1131,8 +1131,8 @@ bool run_regex_mapping(const RegexMappingVector& mapping, const char* test_s, for (g = 1; g < MAX_GROUPS; g++) { if (groups[g].rm_so == (int)(size_t)-1) break; DBG("group %u: [%2u-%2u]: %.*s\n", - g, groups[g].rm_so, groups[g].rm_eo, - groups[g].rm_eo - groups[g].rm_so, test_s + groups[g].rm_so); + g, (unsigned int)groups[g].rm_so, (unsigned int)groups[g].rm_eo, + (int)(groups[g].rm_eo - groups[g].rm_so), test_s + groups[g].rm_so); std::string match(test_s + groups[g].rm_so, groups[g].rm_eo - groups[g].rm_so); ReplaceStringInPlace(result, "\\" + int2str(g), match); diff --git a/core/sip/pcap_logger.cpp b/core/sip/pcap_logger.cpp index be5ec01..0efdb9b 100644 --- a/core/sip/pcap_logger.cpp +++ b/core/sip/pcap_logger.cpp @@ -125,8 +125,8 @@ int pcap_logger::log(const char *data, int data_len, hdr.ip.ip_hl = 5; hdr.ip.ip_v = 4; hdr.ip.ip_tos = 0; - hdr.ip.ip_len = htons(size); - hdr.ip.ip_id = htonl(54321); + hdr.ip.ip_len = (unsigned short) htons(size); + hdr.ip.ip_id = (unsigned short)htonl(54321); hdr.ip.ip_off = 0; hdr.ip.ip_ttl = 255; hdr.ip.ip_p = 0x11; // UDP _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
