Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
8dd52dd1
"vscode:/vscode.git/clone" did not exist on "ac665b6484d9e1e01b156225b6555f07a3f9b9e3"
Commit
8dd52dd1
authored
Feb 21, 2016
by
Davis King
Browse files
Minor changes to avoid compiler warnings in newer versions of GCC.
parent
3e9b7ebb
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
10 deletions
+27
-10
dlib/matrix/matrix_assign_fwd.h
dlib/matrix/matrix_assign_fwd.h
+7
-2
dlib/matrix/matrix_data_layout.h
dlib/matrix/matrix_data_layout.h
+7
-2
dlib/server/server_iostream.h
dlib/server/server_iostream.h
+1
-1
dlib/smart_pointers/shared_ptr.h
dlib/smart_pointers/shared_ptr.h
+2
-2
dlib/smart_pointers/shared_ptr_thread_safe.h
dlib/smart_pointers/shared_ptr_thread_safe.h
+2
-2
dlib/test/least_squares.cpp
dlib/test/least_squares.cpp
+2
-0
dlib/test/smart_pointers.cpp
dlib/test/smart_pointers.cpp
+5
-0
dlib/threads/threads_kernel_shared.h
dlib/threads/threads_kernel_shared.h
+1
-1
No files found.
dlib/matrix/matrix_assign_fwd.h
View file @
8dd52dd1
...
...
@@ -5,8 +5,9 @@
// GCC 4.8 gives false alarms about some variables being uninitialized. Disable these
// false warnings.
#if ( defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 8)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#if defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 8) || (__GNUC__ > 4))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#include "../enable_if.h"
...
...
@@ -403,6 +404,10 @@ namespace dlib
}
#if defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 8) || (__GNUC__ > 4))
#pragma GCC diagnostic pop
#endif
#endif // DLIB_MATRIx_ASSIGn_FWD_
dlib/matrix/matrix_data_layout.h
View file @
8dd52dd1
...
...
@@ -9,8 +9,9 @@
// GCC 4.8 gives false alarms about some matrix operations going out of bounds. Disable
// these false warnings.
#if ( defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 8)
#pragma GCC diagnostic ignored "-Warray-bounds"
#if defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 8) || (__GNUC__ > 4))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
namespace
dlib
...
...
@@ -902,5 +903,9 @@ namespace dlib
}
#if defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 8) || (__GNUC__ > 4))
#pragma GCC diagnostic pop
#endif
#endif // DLIB_MATRIx_DATA_LAYOUT_
dlib/server/server_iostream.h
View file @
8dd52dd1
...
...
@@ -74,7 +74,7 @@ namespace dlib
)
{
bool
my_fault
=
true
;
uint64
this_con_id
;
uint64
this_con_id
=
0
;
try
{
sockstreambuf
buf
(
&
con
);
...
...
dlib/smart_pointers/shared_ptr.h
View file @
8dd52dd1
...
...
@@ -12,7 +12,7 @@
// Don't warn about the use of std::auto_ptr in this file. There is a pragma at the end of
// this file that re-enables the warning.
#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
#if defined(__GNUC__) &&
((
__GNUC__ >= 4 && __GNUC_MINOR__ >= 6
) || (__GNUC__ > 4))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
...
...
@@ -527,7 +527,7 @@ namespace dlib
}
#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
#if defined(__GNUC__) &&
((
__GNUC__ >= 4 && __GNUC_MINOR__ >= 6
) || (__GNUC__ > 4))
#pragma GCC diagnostic pop
#endif
...
...
dlib/smart_pointers/shared_ptr_thread_safe.h
View file @
8dd52dd1
...
...
@@ -13,7 +13,7 @@
// Don't warn about the use of std::auto_ptr in this file. There is a pragma at the end of
// this file that re-enables the warning.
#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
#if defined(__GNUC__) &&
((
__GNUC__ >= 4 && __GNUC_MINOR__ >= 6
) || (__GNUC__ > 4))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
...
...
@@ -497,7 +497,7 @@ namespace dlib
// ----------------------------------------------------------------------------------------
#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
#if defined(__GNUC__) &&
((
__GNUC__ >= 4 && __GNUC_MINOR__ >= 6
) || (__GNUC__ > 4))
#pragma GCC diagnostic pop
#endif
...
...
dlib/test/least_squares.cpp
View file @
8dd52dd1
...
...
@@ -283,8 +283,10 @@ namespace
matrix
<
double
,
2
,
1
>
rosen_residual_derivative_double
(
int
i
,
const
matrix
<
double
,
2
,
1
>&
m
)
{
return
rosen_residual_derivative
(
i
,
m
);
}
/*
matrix<float,2,1> rosen_residual_derivative_float (int i, const matrix<float,2,1>& m)
{ return rosen_residual_derivative(i,m); }
*/
double
rosen_big_residual_double
(
int
i
,
const
matrix
<
double
,
2
,
1
>&
m
)
{
return
rosen_big_residual
(
i
,
m
);
}
...
...
dlib/test/smart_pointers.cpp
View file @
8dd52dd1
...
...
@@ -10,6 +10,11 @@
#include "tester.h"
// Don't warn about auto_ptr
#if defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4))
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
namespace
{
bool
used_array_delete
;
...
...
dlib/threads/threads_kernel_shared.h
View file @
8dd52dd1
...
...
@@ -43,7 +43,7 @@ extern "C"
extern
int
USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives_
;
inline
int
dlib_check_consistent_assert_usage
()
{
USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives_
=
0
;
return
0
;
}
#endif
const
int
dlib_check_assert_helper_variable
=
dlib_check_consistent_assert_usage
();
const
int
DLIB_NO_WARN_UNUSED
dlib_check_assert_helper_variable
=
dlib_check_consistent_assert_usage
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment