diff --git a/xapian-core/api/positioniterator.cc b/xapian-core/api/positioniterator.cc
index 4e48c45..33fda95 100644
--- a/xapian-core/api/positioniterator.cc
+++ b/xapian-core/api/positioniterator.cc
@@ -99,11 +99,11 @@ PositionIterator::operator++()
 }
 
 void
-PositionIterator::skip_to(Xapian::termpos termpos)
+PositionIterator::skip_to(Xapian::termpos pos)
 {
-    LOGCALL_VOID(API, "PositionIterator::skip_to", termpos);
+    LOGCALL_VOID(API, "PositionIterator::skip_to", pos);
     Assert(internal);
-    internal->skip_to(termpos);
+    internal->skip_to(pos);
     if (internal->at_end()) {
 	decref();
 	internal = NULL;
diff --git a/xapian-core/api/postingsource.cc b/xapian-core/api/postingsource.cc
index 6bdc2da..518f73a 100644
--- a/xapian-core/api/postingsource.cc
+++ b/xapian-core/api/postingsource.cc
@@ -300,10 +300,10 @@ ValueMapPostingSource::ValueMapPostingSource(Xapian::valueno slot_)
 }
 
 void
-ValueMapPostingSource::add_mapping(const string & key, double weight)
+ValueMapPostingSource::add_mapping(const string & key, double wt)
 {
-    weight_map[key] = weight;
-    max_weight_in_map = max(weight, max_weight_in_map);
+    weight_map[key] = wt;
+    max_weight_in_map = max(wt, max_weight_in_map);
 }
 
 void
diff --git a/xapian-core/api/valueiterator.cc b/xapian-core/api/valueiterator.cc
index bc2eefc..de09f5c 100644
--- a/xapian-core/api/valueiterator.cc
+++ b/xapian-core/api/valueiterator.cc
@@ -127,11 +127,11 @@ ValueIterator::skip_to(Xapian::docid docid_or_slot)
 }
 
 bool
-ValueIterator::check(Xapian::docid docid)
+ValueIterator::check(Xapian::docid did)
 {
-    LOGCALL(API, bool, "ValueIterator::check", docid);
+    LOGCALL(API, bool, "ValueIterator::check", did);
     Assert(internal);
-    if (!internal->check(docid)) return false;
+    if (!internal->check(did)) return false;
     if (internal->at_end()) {
 	decref();
 	internal = NULL;
diff --git a/xapian-core/backends/dbfactory_remote.cc b/xapian-core/backends/dbfactory_remote.cc
index 0439957..815795a 100644
--- a/xapian-core/backends/dbfactory_remote.cc
+++ b/xapian-core/backends/dbfactory_remote.cc
@@ -32,36 +32,38 @@ using namespace std;
 namespace Xapian {
 
 Database
-Remote::open(const string &host, unsigned int port, Xapian::timeout timeout,
+Remote::open(const string &host, unsigned int port, Xapian::timeout timeout_,
 	     Xapian::timeout connect_timeout)
 {
-    LOGCALL_STATIC(API, Database, "Remote::open", host | port | timeout | connect_timeout);
-    return Database(new RemoteTcpClient(host, port, timeout * 1e-3,
+    LOGCALL_STATIC(API, Database, "Remote::open", host | port | timeout_ | connect_timeout);
+    return Database(new RemoteTcpClient(host, port, timeout_ * 1e-3,
 					connect_timeout * 1e-3, false));
 }
 
 WritableDatabase
 Remote::open_writable(const string &host, unsigned int port,
-		      Xapian::timeout timeout, Xapian::timeout connect_timeout)
+		      Xapian::timeout timeout_, Xapian::timeout connect_timeout)
 {
-    LOGCALL_STATIC(API, WritableDatabase, "Remote::open_writable", host | port | timeout | connect_timeout);
-    return WritableDatabase(new RemoteTcpClient(host, port, timeout * 1e-3,
-			    connect_timeout * 1e-3, true));
+    LOGCALL_STATIC(API, WritableDatabase, "Remote::open_writable", host | port | timeout_ | connect_timeout);
+    return WritableDatabase(new RemoteTcpClient(host, port, timeout_ * 1e-3,
+						connect_timeout * 1e-3, true));
 }
 
 Database
-Remote::open(const string &program, const string &args, Xapian::timeout timeout)
+Remote::open(const string &program, const string &args,
+	     Xapian::timeout timeout_)
 {
-    LOGCALL_STATIC(API, Database, "Remote::open", program | args | timeout);
-    return Database(new ProgClient(program, args, timeout * 1e-3, false));
+    LOGCALL_STATIC(API, Database, "Remote::open", program | args | timeout_);
+    return Database(new ProgClient(program, args, timeout_ * 1e-3, false));
 }
 
 WritableDatabase
 Remote::open_writable(const string &program, const string &args,
-		      Xapian::timeout timeout)
+		      Xapian::timeout timeout_)
 {
-    LOGCALL_STATIC(API, WritableDatabase, "Remote::open_writable", program | args | timeout);
-    return WritableDatabase(new ProgClient(program, args, timeout * 1e-3, true));
+    LOGCALL_STATIC(API, WritableDatabase, "Remote::open_writable", program | args | timeout_);
+    return WritableDatabase(new ProgClient(program, args,
+					   timeout_ * 1e-3, true));
 }
 
 }
diff --git a/xapian-core/common/serialise.h b/xapian-core/common/serialise.h
index 1cadffe..4b8d473 100644
--- a/xapian-core/common/serialise.h
+++ b/xapian-core/common/serialise.h
@@ -54,13 +54,13 @@ encode_length(T len)
 	result += '\xff';
 	len -= 255;
 	while (true) {
-	    unsigned char byte = static_cast<unsigned char>(len & 0x7f);
+	    unsigned char b = static_cast<unsigned char>(len & 0x7f);
 	    len >>= 7;
 	    if (!len) {
-		result += (byte | static_cast<unsigned char>(0x80));
+		result += (b | static_cast<unsigned char>(0x80));
 		break;
 	    }
-	    result += byte;
+	    result += b;
 	}
     }
     return result;
diff --git a/xapian-core/include/xapian/positioniterator.h b/xapian-core/include/xapian/positioniterator.h
index ed776a8..bb61c0b 100644
--- a/xapian-core/include/xapian/positioniterator.h
+++ b/xapian-core/include/xapian/positioniterator.h
@@ -70,9 +70,9 @@ class XAPIAN_VISIBILITY_DEFAULT PositionIterator {
 
     /// Advance the iterator to the next position (postfix version).
     DerefWrapper_<Xapian::termpos> operator++(int) {
-	Xapian::termpos termpos(**this);
+	Xapian::termpos pos(**this);
 	operator++();
-	return DerefWrapper_<Xapian::termpos>(termpos);
+	return DerefWrapper_<Xapian::termpos>(pos);
     }
 
     /** Advance the iterator to term position @a termpos.
diff --git a/xapian-core/include/xapian/postingsource.h b/xapian-core/include/xapian/postingsource.h
index df6e332..268d502 100644
--- a/xapian-core/include/xapian/postingsource.h
+++ b/xapian-core/include/xapian/postingsource.h
@@ -506,7 +506,7 @@ class XAPIAN_VISIBILITY_DEFAULT ValueMapPostingSource
      *  @param key The key looked up from the value slot.
      *  @param weight The weight to give this key.
      */
-    void add_mapping(const std::string &key, double weight);
+    void add_mapping(const std::string &key, double wt);
 
     /** Clear all mappings. */
     void clear_mappings();

