diff options
author | Sangjung Woo <sangjung.woo@samsung.com> | 2016-12-22 11:24:51 +0900 |
---|---|---|
committer | Sangjung Woo <sangjung.woo@samsung.com> | 2016-12-23 17:06:07 +0900 |
commit | 5b9c64147350ccd7859765c1a5cb3323826f2e29 (patch) | |
tree | 9cc25edebe2d54a8e638a2f1ce27b72e11ff8fdd /plugins/common/serialport.hpp | |
parent | be3f71efda71a23251324877e13cc8dec0f5b1f3 (diff) | |
download | automotive-message-broker-5b9c64147350ccd7859765c1a5cb3323826f2e29.tar.gz |
fixed the warning message when enabling -Wall option
This patch fixed the below warning messages.
- warning: comparison between signed and unsigned integer expressions
- warning: no return statement in function returning non-void
- warning: statement has no effect
- warning: unused variable
- warning: when initialized here [-Wreorder]
- warning: control reaches end of non-void function [-Wreturn-type]
- warning: ‘VehicleProperty::ButtonEvent’ is deprecated: Deprecated in
0.14. Use ButtonEventW3C [-Wdeprecated-declarations]
- warning: ignoring return value of 'int dup(int)', declared with
attribute warn_unused_result [-Wunused-result]
- warning: suggest parentheses around '&&' within '||' [-Wparentheses]
- warning: 'connection' may be used uninitialized in this function
[-Wmaybe-uninitialized]
- warning: suggest parentheses around assignment used as truth value
- warning: dereferencing type-punned pointer will break strict-aliasing rules
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Diffstat (limited to 'plugins/common/serialport.hpp')
-rw-r--r-- | plugins/common/serialport.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/common/serialport.hpp b/plugins/common/serialport.hpp index 1d5038e6..8577fb06 100644 --- a/plugins/common/serialport.hpp +++ b/plugins/common/serialport.hpp @@ -21,7 +21,7 @@ private: public: SerialPort() - :fd(0), speed(B9600) + :speed(B9600), fd(0) { } @@ -35,7 +35,7 @@ public: } SerialPort(std::string _tty) - :tty(_tty), fd(0) + :fd(0), tty(_tty) { speed = B9600; } @@ -95,7 +95,7 @@ public: char buff; std::string result; int bytesread = 0; - while( bytesread = ::read(fd, &buff, 1) > 0 ) + while((bytesread = ::read(fd, &buff, 1)) > 0 ) { result += buff; } |