aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2018-05-23 07:39:02 +0000
committerEitan Adler <eadler@FreeBSD.org>2018-05-23 07:39:02 +0000
commit958160f3ecdac980fee1e821fb3ca43888cbe936 (patch)
treeab68d373af23fd10da1ce6e4cef658e9c8f8a630 /sbin
parentae4cfcdf3052b93708aa7a2230bb56dee70eb211 (diff)
downloadsrc-958160f3ecdac980fee1e821fb3ca43888cbe936.tar.gz
src-958160f3ecdac980fee1e821fb3ca43888cbe936.zip
devd: correct two warnings
- catching a polymorphic type by value - "output between 16 and 95 bytes into a destination of size 80"
Notes
Notes: svn path=/head/; revision=334077
Diffstat (limited to 'sbin')
-rw-r--r--sbin/devd/devd.cc2
-rw-r--r--sbin/devd/tests/client_test.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc
index 2709dd8c6696..94e9121358df 100644
--- a/sbin/devd/devd.cc
+++ b/sbin/devd/devd.cc
@@ -1087,7 +1087,7 @@ event_loop(void)
try {
process_event(buffer);
}
- catch (std::length_error e) {
+ catch (const std::length_error& e) {
devdlog(LOG_ERR, "Dropping event %s "
"due to low memory", buffer);
}
diff --git a/sbin/devd/tests/client_test.c b/sbin/devd/tests/client_test.c
index daea14716b46..90081d963f4b 100644
--- a/sbin/devd/tests/client_test.c
+++ b/sbin/devd/tests/client_test.c
@@ -50,7 +50,7 @@ create_two_events(void)
FILE *create_stdout;
FILE *destroy_stdout;
char mdname[80];
- char destroy_cmd[80];
+ char destroy_cmd[95];
char *error;
create_stdout = popen("mdconfig -a -s 64 -t null", "r");