From: Kevin Wasserman Date: Tue, 25 Nov 2014 18:05:16 +0000 (-0500) Subject: Fix integer precision warnings X-Git-Url: http://www.project-moonshot.org/gitweb/?p=gssweb.git;a=commitdiff_plain;h=c03f54e4ae3eb7f490573ec95a20dd186499c110;hp=505a502b488de91de6b0f42effda0cc948126b33 Fix integer precision warnings --- diff --git a/json_gssapi/src/commands/GSSAcquireCred.cpp b/json_gssapi/src/commands/GSSAcquireCred.cpp index 0b43de8..c80db63 100644 --- a/json_gssapi/src/commands/GSSAcquireCred.cpp +++ b/json_gssapi/src/commands/GSSAcquireCred.cpp @@ -82,7 +82,7 @@ bool GSSAcquireCred::loadParameters(JSONObject *params) /* Main processing */ // Easy stuff(*params) - this->time_req = (*params)["time_req"].integer(); + this->time_req = (OM_uint32 )(*params)["time_req"].integer(); /************** * cred_usage * diff --git a/json_gssapi/src/commands/GSSInitSecContext.cpp b/json_gssapi/src/commands/GSSInitSecContext.cpp index c2c93c7..0df10ed 100644 --- a/json_gssapi/src/commands/GSSInitSecContext.cpp +++ b/json_gssapi/src/commands/GSSInitSecContext.cpp @@ -207,11 +207,11 @@ bool GSSInitSecContext::loadParameters(JSONObject *params) // req_flags if (!params->get("req_flags").isNull() ) - this->req_flags = params->get("req_flags").integer(); + this->req_flags = (OM_uint32 )params->get("req_flags").integer(); // time_req if (!params->get("time_req").isNull() ) - this->time_req = params->get("time_req").integer(); + this->time_req = (OM_uint32 )params->get("time_req").integer(); // input_token if (! (params->get("input_token").isNull() || diff --git a/json_gssapi/src/commands/GSSPseudoRandom.cpp b/json_gssapi/src/commands/GSSPseudoRandom.cpp index f9c41e3..b73dc95 100644 --- a/json_gssapi/src/commands/GSSPseudoRandom.cpp +++ b/json_gssapi/src/commands/GSSPseudoRandom.cpp @@ -77,7 +77,7 @@ bool GSSPseudoRandom::loadParameters ( JSONObject* params ) if ( ! params->get("prf_key").isNull() ) { if (params->get("prf_key").isInteger()) - this->key = params->get("prf_key").integer(); + this->key = (int )params->get("prf_key").integer(); else throw std::invalid_argument( "Unrecognized argument type for prf_key." ); } @@ -89,7 +89,7 @@ bool GSSPseudoRandom::loadParameters ( JSONObject* params ) if ( ! params->get("desired_output_len").isNull() ) { if (params->get("desired_output_len").isInteger()) - this->desiredOutputLength = params->get("desired_output_len").integer(); + this->desiredOutputLength = (int )params->get("desired_output_len").integer(); else throw std::invalid_argument( "Unrecognized argument type for desired_output_len." ); }