Commit 6b277448 authored by Davis King's avatar Davis King
Browse files

Changed the code so that gcc doesn't give warnings when supplied with the "-Wall -W"

combined warning option.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403015
parent 7f75ed83
......@@ -721,13 +721,13 @@ namespace dlib
typedef typename EXP::type type;
typedef typename EXP::mem_manager_type mem_manager_type;
template <typename M>
static type apply ( const M& m, long r, long c)
static type apply ( const M& m, long r, long )
{ return m(r,r); }
template <typename M>
static long nr (const M& m) { return std::min(m.nc(),m.nr()); }
template <typename M>
static long nc (const M& m) { return 1; }
static long nc (const M& ) { return 1; }
};
};
......@@ -1035,7 +1035,7 @@ namespace dlib
const static long NC = 0;
typedef typename memory_manager<char>::kernel_1a mem_manager_type;
typedef T type;
static type apply (const T& val, long r, long c)
static type apply (const T& val, long , long )
{ return val; }
};
......@@ -1072,7 +1072,7 @@ namespace dlib
const static long NC = NC_;
typedef typename memory_manager<char>::kernel_1a mem_manager_type;
typedef T type;
static type apply (const T& val, long r, long c)
static type apply (const T& val, long , long )
{ return val; }
};
......@@ -1106,7 +1106,7 @@ namespace dlib
const static long NC = NC_;
typedef typename memory_manager<char>::kernel_1a mem_manager_type;
typedef T type;
static type apply ( long r, long c)
static type apply ( long , long )
{ return val; }
};
......
......@@ -79,7 +79,7 @@ namespace dlib
//allocate but don't initialize num elements of type T
pointer allocate (
size_type num,
typename std_allocator<void,M>::const_pointer hint = 0
typename std_allocator<void,M>::const_pointer = 0
)
{
return (pointer) pool.allocate_array(num*sizeof(T));
......@@ -101,7 +101,7 @@ namespace dlib
}
//deallocate storage p of deleted elements
void deallocate (pointer p, size_type num)
void deallocate (pointer p, size_type )
{
pool.deallocate_array((char*)p);
}
......
......@@ -336,7 +336,7 @@ namespace dlib
}
bool operator== (
const linear_kernel& k
const linear_kernel&
) const
{
return true;
......
......@@ -288,7 +288,7 @@ namespace dlib
}
bool operator== (
const sparse_linear_kernel& k
const sparse_linear_kernel&
) const
{
return true;
......
......@@ -1475,7 +1475,7 @@ namespace dlib
typename scalar_type
>
inline void optimize_working_pair (
const scalar_vector_type2& y,
const scalar_vector_type2& ,
scalar_vector_type& alpha,
const kernel_matrix_cache<K, sample_vector_type, scalar_vector_type2>& Q,
const scalar_vector_type& df,
......
......@@ -149,7 +149,7 @@ namespace
for (unsigned long i = 0; i < alphabet_size-1; ++i)
{
test.increment_count(i);
unsigned long low_count, high_count, total_count;
unsigned long low_count = 0, high_count = 0, total_count = 0;
DLIB_TEST(test.get_range(i,low_count,high_count,total_count) == 1);
DLIB_TEST(high_count == low_count+1);
......@@ -546,7 +546,7 @@ namespace
{
if(!test.increment_count(i))
oom = true;
unsigned long low_count, high_count, total_count;
unsigned long low_count = 0, high_count = 0, total_count = 0;
if (!oom)
{
......
......@@ -263,7 +263,7 @@ class win : public drawable_window
void tab_change (
unsigned long new_idx,
unsigned long old_idx
unsigned long
)
{
tab_label.set_text(tabs.tab_name(new_idx));
......@@ -298,7 +298,7 @@ class win : public drawable_window
}
void lb_double_click (
unsigned long idx
unsigned long
)
{
dlib::queue<unsigned long>::kernel_2a_c sel;
......@@ -335,7 +335,7 @@ class win : public drawable_window
}
static void try_this_junk2 (
void* param
void*
)
{
......
......@@ -46,7 +46,7 @@ namespace
}
bool operator== (
const unopt_sparse_linear_kernel& k
const unopt_sparse_linear_kernel&
) const
{
return true;
......@@ -69,7 +69,7 @@ namespace
}
bool operator== (
const unopt_linear_kernel& k
const unopt_linear_kernel&
) const
{
return true;
......
......@@ -509,7 +509,7 @@ namespace
unsigned long match_index, match_length;
unsigned long match_index = 0, match_length = 0;
unsigned long lookahead_size_before = test.get_lookahead_buffer_size();
unsigned long history_size_before = test.get_history_buffer_size();
test.find_match(match_index,match_length,2);
......
......@@ -49,7 +49,7 @@ namespace dlib
template <int N> void wstr2ustring_t(const wchar_t *src, size_t src_len, ustring &dest);
template <> void wstr2ustring_t<4>(const wchar_t *src, size_t src_len, ustring &dest)
template <> void wstr2ustring_t<4>(const wchar_t *src, size_t , ustring &dest)
{
dest.assign((const unichar *)(src));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment