Skip to content
This repository was archived by the owner on Apr 24, 2022. It is now read-only.

Commit e2fccaf

Browse files
committedFeb 18, 2018
Warnings are cluttering build logs
Clean them up!
1 parent 734a7dd commit e2fccaf

File tree

5 files changed

+40
-21
lines changed

5 files changed

+40
-21
lines changed
 

‎ethminer/MinerAux.h

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ class MinerCLI
9494

9595
static void signalHandler(int sig)
9696
{
97+
(void)sig;
9798
g_running = false;
9899
}
99100

‎libhwmon/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(SOURCES
2-
wraphelper.h
2+
wraphelper.cpp wraphelper.h
33
wrapnvml.h wrapnvml.cpp
44
wrapadl.h wrapadl.cpp
55
wrapamdsysfs.h wrapamdsysfs.cpp

‎libhwmon/wraphelper.cpp

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Wrappers to emulate dlopen() on other systems like Windows
3+
*/
4+
5+
#include "wraphelper.h"
6+
7+
#if defined(_MSC_VER) || defined(_WIN32) || defined(_WIN64)
8+
void *wrap_dlopen(const char *filename) {
9+
return (void *)LoadLibrary(filename);
10+
}
11+
void *wrap_dlsym(void *h, const char *sym) {
12+
return (void *)GetProcAddress((HINSTANCE)h, sym);
13+
}
14+
int wrap_dlclose(void *h) {
15+
/* FreeLibrary returns nonzero on success */
16+
return (!FreeLibrary((HINSTANCE)h));
17+
}
18+
#else
19+
/* assume we can use dlopen itself... */
20+
void *wrap_dlopen(const char *filename) {
21+
return dlopen(filename, RTLD_NOW);
22+
}
23+
void *wrap_dlsym(void *h, const char *sym) {
24+
return dlsym(h, sym);
25+
}
26+
int wrap_dlclose(void *h) {
27+
return dlclose(h);
28+
}
29+
#endif

‎libhwmon/wraphelper.h

+7-20
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,13 @@
66

77
#if defined(_MSC_VER) || defined(_WIN32) || defined(_WIN64)
88
#include <windows.h>
9-
static void *wrap_dlopen(const char *filename) {
10-
return (void *)LoadLibrary(filename);
11-
}
12-
static void *wrap_dlsym(void *h, const char *sym) {
13-
return (void *)GetProcAddress((HINSTANCE)h, sym);
14-
}
15-
static int wrap_dlclose(void *h) {
16-
/* FreeLibrary returns nonzero on success */
17-
return (!FreeLibrary((HINSTANCE)h));
18-
}
9+
void *wrap_dlopen(const char *filename);
10+
void *wrap_dlsym(void *h, const char *sym);
11+
int wrap_dlclose(void *h);
1912
#else
2013
/* assume we can use dlopen itself... */
2114
#include <dlfcn.h>
22-
static void *wrap_dlopen(const char *filename) {
23-
return dlopen(filename, RTLD_NOW);
24-
}
25-
static void *wrap_dlsym(void *h, const char *sym) {
26-
return dlsym(h, sym);
27-
}
28-
static int wrap_dlclose(void *h) {
29-
return dlclose(h);
30-
}
31-
#endif
15+
void *wrap_dlopen(const char *filename);
16+
void *wrap_dlsym(void *h, const char *sym);
17+
int wrap_dlclose(void *h);
18+
#endif

‎libpoolprotocols/stratum/EthStratumClient.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ void EthStratumClient::resolve_handler(const boost::system::error_code& ec, tcp:
117117

118118
void EthStratumClient::connect_handler(const boost::system::error_code& ec, tcp::resolver::iterator i)
119119
{
120+
(void)i;
121+
120122
dev::setThreadName("stratum");
121123

122124
if (!ec)

0 commit comments

Comments
 (0)
This repository has been archived.