summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-08-13 07:34:03 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-08-13 07:34:03 +0200
commit638dcbbcf20abca150b986125264b315a8dc1f81 (patch)
tree60aad6005f52fa58d041336db1867de1b6dfba9b
parentd073e82058df58a6678a4445e411201a1712b14f (diff)
Adding one last warning on writeString.
-rw-r--r--includes/Handle.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/Handle.h b/includes/Handle.h
index b167256..1753cb6 100644
--- a/includes/Handle.h
+++ b/includes/Handle.h
@@ -77,7 +77,7 @@ class Handle {
// these need to be changed into Future<>s
template <size_t L>
- ssize_t writeString(const char (&str)[L]) { return writeString(str, L - 1); }
+ ssize_t writeString(const char (&str)[L]) __attribute__((warn_unused_result));
ssize_t writeString(const String & str) __attribute__((warn_unused_result)) { return forceWrite(str.to_charp(), str.strlen()); }
ssize_t writeString(const char * str, ssize_t len) __attribute__((warn_unused_result)) { return forceWrite(str, len); }
ssize_t forceRead(void * buf, size_t count, Events::BaseEvent * evt = NULL) throw (GeneralException) __attribute__((warn_unused_result));
@@ -106,6 +106,9 @@ class Handle {
Handle & operator=(const Handle &) = delete;
};
+template <size_t L>
+ssize_t Handle::writeString(const char (&str)[L]) { return writeString(str, L - 1); }
+
class HPrinter : public Handle {
public:
virtual void close() throw (GeneralException) { }