summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2016-08-12 02:49:03 -0400
committerMichael Cahill <michael.cahill@mongodb.com>2016-08-12 16:49:03 +1000
commitf69bbc18148c6fced50b01e04d552f0053fce20c (patch)
treea6d4f7250d32505ea9e0c94ceca4a98ce7416cb4 /ext
parenta044bf81ace95df8fd9a5fd85fcf2c15f898cbd8 (diff)
downloadmongo-f69bbc18148c6fced50b01e04d552f0053fce20c.tar.gz
WT-2820 add gcc warn_unused_result attribute (#2938)
* Add the gcc "cold" attribute to the verbose, message, and assorted error functions (informs the compiler that the function is unlikely to be executed). * Add the WT_IGNORE_RET() macro that ignores return values in the handfull of places we want to ignore return values. * Replace calls to fprintf() in the utility with calls to util_err(), replace local variable names in error messages with class names.
Diffstat (limited to 'ext')
-rw-r--r--ext/encryptors/rotn/rotn_encrypt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/encryptors/rotn/rotn_encrypt.c b/ext/encryptors/rotn/rotn_encrypt.c
index 9a92ae7b642..3b5379ca410 100644
--- a/ext/encryptors/rotn/rotn_encrypt.c
+++ b/ext/encryptors/rotn/rotn_encrypt.c
@@ -448,9 +448,10 @@ rotn_configure(ROTN_ENCRYPTOR *rotn_encryptor, WT_CONFIG_ARG *config)
strlen("rotn_force_error") == k.len) {
rotn_encryptor->force_error = v.val == 0 ? 0 : 1;
continue;
- }
- else {
- (void)config_parser->close(config_parser);
+ } else {
+ if ((ret = config_parser->close(config_parser)) != 0)
+ return (rotn_error(rotn_encryptor,
+ NULL, ret, "WT_CONFIG_PARSER.close"));
return (rotn_error(rotn_encryptor, NULL, EINVAL,
"unknown config key"));
}