summaryrefslogtreecommitdiff
path: root/src/common/socket.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-19 02:46:37 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-19 02:49:41 +0300
commitc2c1322b230dc0f564397ac68615640f1083ee56 (patch)
tree9cbdf777c0636e16963f368cb9d9fc48f094ff13 /src/common/socket.h
parent5b74faa8afd04771af7acb918072ea71a3db475f (diff)
downloadhercules-c2c1322b230dc0f564397ac68615640f1083ee56.tar.gz
hercules-c2c1322b230dc0f564397ac68615640f1083ee56.tar.bz2
hercules-c2c1322b230dc0f564397ac68615640f1083ee56.tar.xz
hercules-c2c1322b230dc0f564397ac68615640f1083ee56.zip
Fix some cast discards 'const' qualifier from pointer target type warnings.
Add -Wcast-qual into configure comment.
Diffstat (limited to 'src/common/socket.h')
-rw-r--r--src/common/socket.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/socket.h b/src/common/socket.h
index 70fbc3492..e1ea94f5a 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -85,11 +85,11 @@ struct config_setting_t;
#define WP2PTR(fd) WFIFO2PTR(fd)
// buffer I/O macros
-#define RBUFP(p,pos) (((uint8*)(p)) + (pos))
-#define RBUFB(p,pos) (*(uint8*)RBUFP((p),(pos)))
-#define RBUFW(p,pos) (*(uint16*)RBUFP((p),(pos)))
-#define RBUFL(p,pos) (*(uint32*)RBUFP((p),(pos)))
-#define RBUFQ(p,pos) (*(uint64*)RBUFP((p),(pos)))
+#define RBUFP(p,pos) (((const uint8*)(p)) + (pos))
+#define RBUFB(p,pos) (*(const uint8*)RBUFP((p),(pos)))
+#define RBUFW(p,pos) (*(const uint16*)RBUFP((p),(pos)))
+#define RBUFL(p,pos) (*(const uint32*)RBUFP((p),(pos)))
+#define RBUFQ(p,pos) (*(const uint64*)RBUFP((p),(pos)))
#define WBUFP(p,pos) (((uint8*)(p)) + (pos))
#define WBUFB(p,pos) (*(uint8*)WBUFP((p),(pos)))