]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Cast to void where we know a call will work or just want side effects (#4537)
authorJames Jones <jejones3141@gmail.com>
Wed, 1 Jun 2022 01:25:31 +0000 (20:25 -0500)
committerGitHub <noreply@github.com>
Wed, 1 Jun 2022 01:25:31 +0000 (21:25 -0400)
This deals with the following CIDs: 146913315039111503964,
1504282 (#1 of 5)

src/lib/server/snmp.c
src/lib/util/dict_util.c
src/lib/util/log.c
src/modules/rlm_smtp/rlm_smtp.c

index ef29ca265c4cea274dfb8d68fa788f20e2003f78..6f049931fa1962f062676405a62501f83f95126d 100644 (file)
@@ -1028,7 +1028,7 @@ int fr_snmp_process(request_t *request)
                        fr_sbuff_t      oid_str_sbuff = FR_SBUFF_OUT(oid_str, sizeof(oid_str));
                        fr_pair_list_free(&head);
 
-                       fr_sbuff_in_char(&oid_str_sbuff, '.');
+                       (void) fr_sbuff_in_char(&oid_str_sbuff, '.');
 
                        /* Get the length of the matching part */
                        oid_len = fr_dict_attr_oid_print(&oid_str_sbuff, attr_snmp_root, da_stack.da[-(ret)], false);
index 75f5f21f7cde305ea8c5dac3bdf795757a6bf19d..8101ba2a28366af44e643b15b313a59ed82e203c 100644 (file)
@@ -1880,7 +1880,7 @@ ssize_t fr_dict_attr_by_oid_substr(fr_dict_attr_err_t *err,
 #if 0
        if (!fr_sbuff_next_if_char(in, '.')) our_parent = fr_dict_root(fr_dict_by_da(parent));
 #else
-       fr_sbuff_next_if_char(in, '.');
+       (void) fr_sbuff_next_if_char(in, '.');
 #endif
        *out = NULL;
 
index 230b04406d646bf8c2b0cb237d73b4d456b6dd35..c5ebd30428f56ecf0a0f60a1d2e48f4e52bdc811 100644 (file)
@@ -656,7 +656,7 @@ void fr_vlog_perror(fr_log_t const *log, fr_log_type_t type, char const *file, i
        /*
         *      Add the prefix for the first line
         */
-       if (f_rules->first_prefix) fr_sbuff_in_strcpy(&sbuff, f_rules->first_prefix);
+       if (f_rules->first_prefix) (void) fr_sbuff_in_strcpy(&sbuff, f_rules->first_prefix);
 
        /*
         *      Add the (optional) message, and/or (optional) error
index 6c3f62bee670132dd095e38562c17a037a6a8c7c..fc04edcfca6d48bd585518046a317081c8d9db79 100644 (file)
@@ -717,7 +717,7 @@ static int attachments_source(rlm_smtp_thread_t *t, fr_mail_ctx_t *uctx, curl_mi
        /* Make sure the template_directory path ends in a "/" */
        if (inst->template_dir[talloc_array_length(inst->template_dir)-2] != '/'){
                RDEBUG2("Adding / to end of template_dir");
-               fr_sbuff_in_char(&path_buffer, '/');
+               (void) fr_sbuff_in_char(&path_buffer, '/');
        }
 
        /* Mark the buffer so we only re-write after the template_dir component */