summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2007-11-21 17:05:50 (UTC)
committer Michael Krelin <hacker@klever.net>2007-11-21 17:05:50 (UTC)
commitd9772d76607ad5b293e385df26cce4c87b8f6e54 (patch) (side-by-side diff)
tree2839b510d90652a429af68c37970bed1d63970fd
parent55008364921771a74a1192411583a72cc05adfa6 (diff)
downloadlibopkele-d9772d76607ad5b293e385df26cce4c87b8f6e54.zip
libopkele-d9772d76607ad5b293e385df26cce4c87b8f6e54.tar.gz
libopkele-d9772d76607ad5b293e385df26cce4c87b8f6e54.tar.bz2
further calming compiler down
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--lib/consumer.cc2
-rw-r--r--lib/extension.cc6
-rw-r--r--lib/sreg.cc6
-rw-r--r--test/test.cc6
4 files changed, 10 insertions, 10 deletions
diff --git a/lib/consumer.cc b/lib/consumer.cc
index d578546..7881f5f 100644
--- a/lib/consumer.cc
+++ b/lib/consumer.cc
@@ -368,25 +368,25 @@ namespace opkele {
if(!server.empty()) {
gotit = true;
break;
}
}
if(ns==string::npos) break;
}
}
if(server.empty())
throw failed_assertion(OPKELE_CP_ "The location has no openid.server declaration");
}
- assoc_t consumer_t::find_assoc(const string& server) {
+ assoc_t consumer_t::find_assoc(const string& /* server */) {
throw failed_lookup(OPKELE_CP_ "no find_assoc() provided");
}
string consumer_t::normalize(const string& url) {
string rv = url;
// strip leading and trailing spaces
string::size_type i = rv.find_first_not_of(" \t\r\n");
if(i==string::npos)
throw bad_input(OPKELE_CP_ "empty URL");
if(i)
rv.erase(0,i);
i = rv.find_last_not_of(" \t\r\n");
diff --git a/lib/extension.cc b/lib/extension.cc
index 44cf0cb..8f22562 100644
--- a/lib/extension.cc
+++ b/lib/extension.cc
@@ -1,15 +1,15 @@
#include <opkele/exception.h>
#include <opkele/extension.h>
namespace opkele {
- void extension_t::checkid_hook(params_t& p,const string& identity) {
+ void extension_t::checkid_hook(params_t& /* p */,const string& /* identity */ ) {
throw not_implemented(OPKELE_CP_ "Consumer checkid_hook not implemented");
}
- void extension_t::id_res_hook(const params_t& p,const params_t& sp,const string& identity) {
+ void extension_t::id_res_hook(const params_t& /* p */,const params_t& /* sp */,const string& /* identity */) {
throw not_implemented(OPKELE_CP_ "Consumer id_res_hook not implemented");
}
- void extension_t::checkid_hook(const params_t& pin,params_t& pout) {
+ void extension_t::checkid_hook(const params_t& /* pin */,params_t& /* pout */) {
throw not_implemented(OPKELE_CP_ "Server checkid_hook not implemented");
}
}
diff --git a/lib/sreg.cc b/lib/sreg.cc
index 08e66b7..60dc691 100644
--- a/lib/sreg.cc
+++ b/lib/sreg.cc
@@ -18,42 +18,42 @@ namespace opkele {
{ "country", sreg_t::field_country },
{ "language", sreg_t::field_language },
{ "timezone", sreg_t::field_timezone }
};
# define fields_BEGIN fields
# define fields_END &fields[sizeof(fields)/sizeof(*fields)]
typedef const struct _sreg_field *fields_iterator;
bool operator==(const struct _sreg_field& fd,const string& fn) {
return fd.fieldname==fn;
}
- void sreg_t::checkid_hook(params_t& p,const string& identity) {
+ void sreg_t::checkid_hook(params_t& p,const string& /* identity */) {
string fr, fo;
for(fields_iterator f=fields_BEGIN;f<fields_END;++f) {
if(f->fieldbit&fields_required) {
if(!fr.empty()) fr+=",";
fr += f->fieldname;
}
if(f->fieldbit&fields_optional) {
if(!fo.empty()) fo+=",";
fo += f->fieldname;
}
}
if(!fr.empty()) p["sreg.required"]=fr;
if(!fo.empty()) p["sreg.optional"]=fo;
if(!policy_url.empty()) p["sreg.policy_url"]=policy_url;
}
- void sreg_t::id_res_hook(const params_t& p,const params_t& sp,const string& identity) {
+ void sreg_t::id_res_hook(const params_t& /* p */,const params_t& sp,const string& /* identity */) {
clear();
for(fields_iterator f=fields_BEGIN;f<fields_END;++f) {
string fn = "sreg."; fn+=f->fieldname;
if(!sp.has_param(fn)) continue;
has_fields |= f->fieldbit;
response[f->fieldbit]=sp.get_param(fn);
}
}
const string& sreg_t::get_field(fieldbit_t fb) const {
response_t::const_iterator i = response.find(fb);
if(i==response.end())
@@ -109,16 +109,16 @@ namespace opkele {
setup_response(pin,pout);
fields_response &= has_fields;
for(fields_iterator f=fields_BEGIN;f<fields_END;++f) {
if(!(f->fieldbit&fields_response)) continue;
if(!pout["signed"].empty())
pout["signed"] +=',';
string pn = "sreg."; pn += f->fieldname;
pout["signed"] += pn;
pout[pn] = get_field(f->fieldbit);
}
}
- void sreg_t::setup_response(const params_t& pin,params_t& pout) {
+ void sreg_t::setup_response(const params_t& /* pin */,params_t& /* pout */) {
fields_response = (fields_required|fields_optional)&has_fields;
}
}
diff --git a/test/test.cc b/test/test.cc
index 0010f2b..f92284c 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -5,31 +5,31 @@ using namespace std;
#include <opkele/consumer.h>
#include "config.h"
class failed_test : public opkele::exception {
public:
failed_test(OPKELE_E_PARS)
: exception(OPKELE_E_CONS) { }
};
class dummy_consumer_t : public opkele::consumer_t {
public:
- virtual opkele::assoc_t store_assoc(const string& server,const string& handle,const opkele::secret_t& secret,int expires_in) {
+ virtual opkele::assoc_t store_assoc(const string& /* server */,const string& /* handle */,const opkele::secret_t& /* secret */,int /* expires_in */) {
throw opkele::not_implemented(OPKELE_CP_ "Not implemented");
}
- virtual opkele::assoc_t retrieve_assoc(const string& server,const string& handle) {
+ virtual opkele::assoc_t retrieve_assoc(const string& /* server */ ,const string& /* handle */) {
throw opkele::not_implemented(OPKELE_CP_ "Not implemented");
}
- virtual void invalidate_assoc(const string& server,const string& handle) {
+ virtual void invalidate_assoc(const string& /* server */,const string& /* handle */) {
throw opkele::not_implemented(OPKELE_CP_ "Not implemented");
}
};
void test_retrieve_links(const string& f,bool success,const string& s="",const string& d="") {
dummy_consumer_t dc;
string server, delegate;
try {
dc.retrieve_links("file://" OPKELE_SRC_DIR "/test/html/"+f,server,delegate);
if(!success)
throw failed_test(OPKELE_CP_ "Retrieved links when it shouldn't");