mirror of
https://github.com/RangeNetworks/openbts.git
synced 2025-11-03 05:13:16 +00:00
Correction of trivial warnings.
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4670 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
19
CLI/CLI.cpp
19
CLI/CLI.cpp
@@ -284,14 +284,14 @@ int tmsis(int argc, char** argv, ostream& os)
|
||||
|
||||
int isIMSI(const char *imsi)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
if (!imsi)
|
||||
return 0;
|
||||
if (strlen(imsi) != 15)
|
||||
|
||||
size_t imsiLen = strlen(imsi);
|
||||
if (imsiLen != 15)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < strlen(imsi); i++) {
|
||||
for (size_t i = 0; i < imsiLen; i++) {
|
||||
if (!isdigit(imsi[i]))
|
||||
return 0;
|
||||
}
|
||||
@@ -461,14 +461,15 @@ int cellID(int argc, char** argv, ostream& os)
|
||||
|
||||
|
||||
/** Print table of current transactions. */
|
||||
int calls(int argc, char** argv, ostream& os)
|
||||
int calls(int argc, char** /*argv*/, ostream& os)
|
||||
{
|
||||
bool showAll = false;
|
||||
if (argc==2) showAll = true;
|
||||
if (argc>2) return BAD_NUM_ARGS;
|
||||
size_t count = gTransactionTable.dump(os);
|
||||
if (argc > 2)
|
||||
return BAD_NUM_ARGS;
|
||||
|
||||
//fix later -kurtis
|
||||
//bool showAll = (argc == 2);
|
||||
//size_t count = gTransactionTable.dump(os,showAll);
|
||||
size_t count = gTransactionTable.dump(os);
|
||||
os << endl << count << " transactions in table" << endl;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
gConfig.setUpdateHook(purgeConfig);
|
||||
|
||||
char *keys[5] = {"key1", "key2", "key3", "key4", "key5"};
|
||||
const char *keys[5] = {"key1", "key2", "key3", "key4", "key5"};
|
||||
|
||||
for (int i=0; i<5; i++) {
|
||||
gConfig.set(keys[i],i);
|
||||
|
||||
@@ -35,7 +35,7 @@ string URLEncode(const string &c)
|
||||
{
|
||||
static const char *digits = "01234567890ABCDEF";
|
||||
string retVal="";
|
||||
for (int i=0; i<c.length(); i++)
|
||||
for (size_t i=0; i<c.length(); i++)
|
||||
{
|
||||
const char ch = c[i];
|
||||
if (isalnum(ch) || strchr("-_.!~'()",ch)) {
|
||||
|
||||
@@ -135,7 +135,7 @@ class CCCHL2 : public L2DL {
|
||||
|
||||
void writeLowSide(const GSM::L2Frame&) { assert(0); }
|
||||
|
||||
L3Frame* readHighSide(unsigned timeout=3600000) { assert(0); return NULL; }
|
||||
L3Frame* readHighSide(unsigned /*timeout = 3600000*/) { assert(0); return NULL; }
|
||||
|
||||
void writeHighSide(const GSM::L3Frame&);
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ void SIPEngine::saveResponse(osip_message_t *response)
|
||||
|
||||
|
||||
|
||||
void SIPEngine::saveBYE(const osip_message_t *BYE, bool mine)
|
||||
void SIPEngine::saveBYE(const osip_message_t *BYE, bool /*mine*/)
|
||||
{
|
||||
// Instead of cloning, why not just keep the old one?
|
||||
// Because that doesn't work in all calling contexts.
|
||||
@@ -223,7 +223,7 @@ void SIPEngine::saveBYE(const osip_message_t *BYE, bool mine)
|
||||
osip_message_clone(BYE,&mBYE);
|
||||
}
|
||||
|
||||
void SIPEngine::saveCANCEL(const osip_message_t *CANCEL, bool mine)
|
||||
void SIPEngine::saveCANCEL(const osip_message_t *CANCEL, bool /*mine*/)
|
||||
{
|
||||
// Instead of cloning, why not just keep the old one?
|
||||
// Because that doesn't work in all calling contexts.
|
||||
@@ -232,7 +232,7 @@ void SIPEngine::saveCANCEL(const osip_message_t *CANCEL, bool mine)
|
||||
osip_message_clone(CANCEL,&mCANCEL);
|
||||
}
|
||||
|
||||
void SIPEngine::saveERROR(const osip_message_t *ERROR, bool mine)
|
||||
void SIPEngine::saveERROR(const osip_message_t *ERROR, bool /*mine*/)
|
||||
{
|
||||
// Instead of cloning, why not just keep the old one?
|
||||
// Because that doesn't work in all calling contexts.
|
||||
@@ -276,7 +276,7 @@ void SIPEngine::user( const char * wCallID, const char * IMSI, const char *origI
|
||||
}
|
||||
|
||||
|
||||
void SIPEngine::writePrivateHeaders(osip_message_t *msg, const GSM::LogicalChannel *chan)
|
||||
void SIPEngine::writePrivateHeaders(osip_message_t *msg, const GSM::LogicalChannel* /*chan*/)
|
||||
{
|
||||
// P-PHY-Info
|
||||
// This is a non-standard private header in OpenBTS.
|
||||
@@ -474,7 +474,7 @@ SIPState SIPEngine::SOSSendINVITE(short wRtp_port, unsigned wCodec, const GSM::
|
||||
gConfig.getStr("Control.Emergency.Geolocation").c_str());
|
||||
osip_message_set_content_type(invite, strdup("application/pidf+xml"));
|
||||
char tmp[20];
|
||||
sprintf(tmp,"%u",strlen(xml));
|
||||
sprintf(tmp,"%u", static_cast<unsigned>(strlen(xml)));
|
||||
osip_message_set_content_length(invite, strdup(tmp));
|
||||
osip_message_set_body(invite,xml,strlen(xml));
|
||||
}
|
||||
@@ -485,7 +485,7 @@ SIPState SIPEngine::SOSSendINVITE(short wRtp_port, unsigned wCodec, const GSM::
|
||||
osip_message_free(invite);
|
||||
mState = Starting;
|
||||
return mState;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
SIPState SIPEngine::MOCSendINVITE( const char * wCalledUsername,
|
||||
@@ -526,7 +526,7 @@ SIPState SIPEngine::MOCSendINVITE( const char * wCalledUsername,
|
||||
osip_message_free(invite);
|
||||
mState = Starting;
|
||||
return mState;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
SIPState SIPEngine::MOCResendINVITE()
|
||||
@@ -893,7 +893,7 @@ SIPState SIPEngine::MODWaitForCANCELOK(Mutex *lock)
|
||||
|
||||
static bool containsResponse(vector<unsigned> *validResponses, unsigned code)
|
||||
{
|
||||
for (int i = 0; i < validResponses->size(); i++) {
|
||||
for (size_t i = 0; i < validResponses->size(); i++) {
|
||||
if (validResponses->at(i) == code)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ osip_message_t * SIP::sip_message( const char * dialed_number, const char * sip_
|
||||
}
|
||||
|
||||
// Content-Length
|
||||
sprintf(temp_buf,"%u",strlen(message));
|
||||
sprintf(temp_buf,"%u", static_cast<unsigned>(strlen(message)));
|
||||
osip_message_set_content_length(request, strdup(temp_buf));
|
||||
|
||||
// Payload.
|
||||
@@ -645,7 +645,7 @@ osip_message_t * SIP::sip_ack(const char * req_uri, const char * dialed_number,
|
||||
}
|
||||
|
||||
|
||||
osip_message_t * SIP::sip_bye(const char * req_uri, const char * dialed_number, const char * sip_username, short wlocal_port, const char * local_ip, const char * proxy_ip, short wproxy_port, const osip_from_t* from_header, const osip_to_t* to_header, const char * via_branch, const osip_call_id_t* call_id_header, int cseq) {
|
||||
osip_message_t * SIP::sip_bye(const char * req_uri, const char * dialed_number, const char * sip_username, short wlocal_port, const char * local_ip, const char * /*proxy_ip*/, short wproxy_port, const osip_from_t* from_header, const osip_to_t* to_header, const char * via_branch, const osip_call_id_t* call_id_header, int cseq) {
|
||||
|
||||
// FIXME -- We really need some NULL-value error checking in here.
|
||||
|
||||
@@ -1005,7 +1005,7 @@ osip_message_t * SIP::sip_ringing( osip_message_t * invite, const char * sip_use
|
||||
}
|
||||
|
||||
|
||||
osip_message_t * SIP::sip_okay( osip_message_t * inv, const char * sip_username, const char * local_ip, short wlocal_port)
|
||||
osip_message_t * SIP::sip_okay( osip_message_t * inv, const char* /*sip_username*/, const char* /*local_ip*/, short wlocal_port)
|
||||
{
|
||||
|
||||
// Check for consistency.
|
||||
@@ -1048,7 +1048,7 @@ osip_message_t * SIP::sip_okay( osip_message_t * inv, const char * sip_username,
|
||||
}
|
||||
|
||||
|
||||
osip_message_t * SIP::sip_info(unsigned info, const char *dialed_number, short rtp_port, const char * sip_username, short wlocal_port, const char * local_ip, const char * proxy_ip, const char * from_tag, const char * via_branch, const osip_call_id_t *call_id_header, int cseq) {
|
||||
osip_message_t * SIP::sip_info(unsigned info, const char *dialed_number, short /*rtp_port*/, const char * sip_username, short wlocal_port, const char * local_ip, const char * proxy_ip, const char * from_tag, const char * via_branch, const osip_call_id_t *call_id_header, int cseq) {
|
||||
|
||||
char local_port[10];
|
||||
sprintf(local_port, "%i", wlocal_port);
|
||||
|
||||
@@ -99,7 +99,7 @@ void SIP::make_branch( char * branch )
|
||||
uint64_t r1 = random();
|
||||
uint64_t r2 = random();
|
||||
uint64_t val = (r1<<32) + r2;
|
||||
sprintf(branch,"z9hG4bKobts28%llx", val);
|
||||
sprintf(branch,"z9hG4bKobts28%llx", static_cast<long long unsigned int>(val));
|
||||
}
|
||||
|
||||
/* get the return address from the SIP VIA header
|
||||
|
||||
@@ -97,11 +97,11 @@ int DummyLoad::readSamples(short *buf, int len, bool *overrun,
|
||||
underrunLock.unlock();
|
||||
if (currstamp+len < timestamp) {
|
||||
usleep(100);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
else if (currstamp < timestamp) {
|
||||
usleep(100);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
else if (timestamp+len < currstamp) {
|
||||
memcpy(buf,dummyBurst+dummyBurstCursor*2,sizeof(short)*2*(dummyBurstSz-dummyBurstCursor));
|
||||
|
||||
@@ -86,10 +86,10 @@ bool DummyLoad::stop()
|
||||
|
||||
|
||||
// NOTE: Assumes sequential reads
|
||||
int DummyLoad::readSamples(short *buf, int len, bool *overrun,
|
||||
int DummyLoad::readSamples(short *buf, int len, bool* /*overrun*/,
|
||||
TIMESTAMP timestamp,
|
||||
bool *wUnderrun,
|
||||
unsigned *RSSI)
|
||||
unsigned* /*RSSI*/)
|
||||
{
|
||||
updateTime();
|
||||
underrunLock.lock();
|
||||
@@ -97,11 +97,11 @@ int DummyLoad::readSamples(short *buf, int len, bool *overrun,
|
||||
underrunLock.unlock();
|
||||
if (currstamp+len < timestamp) {
|
||||
usleep(100);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
else if (currstamp < timestamp) {
|
||||
usleep(100);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
else if (timestamp+len < currstamp) {
|
||||
memcpy(buf,dummyBurst+dummyBurstCursor*2,sizeof(short)*2*(dummyBurstSz-dummyBurstCursor));
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
using namespace GSM;
|
||||
|
||||
/** Indicated signalVector symmetry */
|
||||
typedef enum Symmetry {
|
||||
enum Symmetry {
|
||||
NONE = 0,
|
||||
ABSSYM = 1
|
||||
};
|
||||
|
||||
/** Convolution type indicator */
|
||||
typedef enum ConvType {
|
||||
enum ConvType {
|
||||
FULL_SPAN = 0,
|
||||
OVERLAP_ONLY = 1,
|
||||
START_ONLY = 2,
|
||||
|
||||
@@ -116,8 +116,8 @@ void startTransceiver()
|
||||
|
||||
// Start the transceiver binary, if the path is defined.
|
||||
// If the path is not defined, the transceiver must be started by some other process.
|
||||
char TRXnumARFCN[4];
|
||||
sprintf(TRXnumARFCN,"%1d",gConfig.getNum("GSM.Radio.ARFCNs"));
|
||||
char TRXnumARFCN[16];
|
||||
sprintf(TRXnumARFCN,"%1d", static_cast<int>(gConfig.getNum("GSM.Radio.ARFCNs")));
|
||||
LOG(NOTICE) << "starting transceiver " << transceiverPath << " " << TRXnumARFCN;
|
||||
gTransceiverPid = vfork();
|
||||
LOG_ASSERT(gTransceiverPid>=0);
|
||||
|
||||
Reference in New Issue
Block a user