Thanks to GCC's -Wall, I was able to find and remove several unused variables.
Also perform some minor cleanups of things that I happened to notice while removing the unused variables.
account->password.used = 0;
account->shell.used = 0;
- f_status_t status = F_none;
-
const size_t length_max = sysconf(_SC_GETPW_R_SIZE_MAX);
// note: pointer seems pointless except that it is used to determine if the name was found.
account->password.used = 0;
account->shell.used = 0;
- f_status_t status = F_none;
-
const size_t length_max = sysconf(_SC_GETPW_R_SIZE_MAX);
// note: pointer seems pointless except that it is used to determine if the name was found.
if (!id) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status_t status = F_none;
-
const size_t length_max = sysconf(_SC_GETPW_R_SIZE_MAX);
// note: pointer seems pointless except that it is used to determine if the name was found.
if (!id) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status_t status = F_none;
-
const size_t length_max = sysconf(_SC_GETPW_R_SIZE_MAX);
// note: pointer seems pointless except that it is used to determine if the name was found.
if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status_t status = F_none;
-
if (set.before) {
fprintf(stream, "%s", set.before->string);
}
if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status_t status = F_none;
-
if (set.before) {
dprintf(id, "%s", set.before->string);
}
if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status_t status = F_none;
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status_t status = F_none;
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
*written = 0;
- f_status_t status = F_none;
f_array_length_t write_amount = 1;
f_array_length_t write_size = file.size_write;
f_array_length_t write_max = total;
*written = 0;
- f_status_t status = F_none;
f_array_length_t write_size = file.size_write;
f_array_length_t write_max = total;
f_array_length_t distance = 0;
uint8_t utf_width = 0;
- uint8_t i = 0;
position = range.start;
f_array_length_t width_max = (range->stop - range->start) + 1;
f_array_length_t next = 0;
- f_array_length_t next_width_max = 0;
if (width_max > buffer.used - range->start) {
width_max = buffer.used - range->start;
status = f_utf_is_zero_width(buffer.string + range->start, width_max);
if (status == F_true) {
- next_width_max = 0;
next = range->start + 1;
for (; next < buffer.used && next <= range->stop; next += macro_f_utf_byte_width_is(buffer.string[next])) {
- next_width_max = (range->stop - next) + 1;
status = f_utf_is_graph(buffer.string + next, width_max);
#if !defined(_di_f_serialize_un_simple_find_) || !defined(_di_f_serialize_un_simple_get_)
f_status_t private_f_serialize_un_simple_find(const f_string_static_t serialize, const f_array_length_t index, f_string_range_t *location) {
- f_status_t status = F_none;
f_array_length_t i = 0;
f_array_length_t start = 0;
#if !defined(_di_f_utf_character_is_emoji_) || !defined(_di_f_utf_is_emoji_)
f_status_t private_f_utf_character_is_emoji(const f_utf_character_t character, const uint8_t width) {
- // reduce the number of checks by grouping checks by first byte.
- const uint8_t byte_first = macro_f_utf_character_t_to_char_1(character);
-
if (width == 2) {
// Latin-1 Supplement: U+00A9, U+00AE.
f_status_t private_f_utf_character_is_symbol(const f_utf_character_t character, const uint8_t width) {
// reduce the number of checks by grouping checks by first byte.
- const uint8_t byte_first = macro_f_utf_character_t_to_char_1(character);
+ //const uint8_t byte_first = macro_f_utf_character_t_to_char_1(character);
// @todo: handle all Unicode "symbol".
f_status_t private_f_utf_character_is_unassigned(const f_utf_character_t character, const uint8_t width) {
// reduce the number of checks by grouping checks by first byte.
- const uint8_t byte_first = macro_f_utf_character_t_to_char_1(character);
+ //const uint8_t byte_first = macro_f_utf_character_t_to_char_1(character);
// @todo: Basic Multilingual Plane
// @todo: handle all unassigned UTF-8 spaces.
status = F_none;
- int directory_fd = 0;
f_array_length_t failures_used = recurse.failures ? recurse.failures->used : 0;
{
status = F_none;
- int directory_fd = 0;
f_array_length_t failures_used = recurse.failures ? recurse.failures->used : 0;
{
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination);
if (F_status_is_error(status)) return status;
- const f_array_length_t input_start = range->start;
const f_array_length_t used_start = destination->used;
f_array_length_t i = 0;
f_array_length_t slash_count = 0;
- f_string_range_t range_next = f_string_range_t_initialize;
-
uint8_t width = 0;
// find the first graph character.
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 2, destination);
if (F_status_is_error(status)) return status;
- const f_array_length_t input_start = range->start;
const f_array_length_t used_start = destination->used;
bool is_comment = F_false;
if (!comments) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- const f_array_length_t found_used = found->used;
-
f_status_t status = f_fss_skip_past_delimit(buffer, range);
if (F_status_is_error(status)) return status;
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination);
if (F_status_is_error(status)) return status;
- const f_array_length_t input_start = range->start;
const f_array_length_t used_start = destination->used;
f_array_length_t i = 0;
f_array_length_t slash_count = 0;
- f_string_range_t range_next = f_string_range_t_initialize;
-
bool ends_on_space = F_false;
uint8_t width = 0;
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination);
if (F_status_is_error(status)) return status;
- const f_array_length_t input_start = range->start;
const f_array_length_t used_start = destination->used;
bool is_comment = F_false;
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination);
if (F_status_is_error(status)) return status;
- const f_array_length_t input_start = range->start;
const f_array_length_t used_start = destination->used;
f_array_length_t i = 0;
f_array_length_t slash_count = 0;
- f_string_range_t range_next = f_string_range_t_initialize;
-
bool ends_on_space = F_false;
uint8_t width = 0;
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination);
if (F_status_is_error(status)) return status;
- const f_array_length_t input_start = range->start;
const f_array_length_t used_start = destination->used;
bool is_comment = F_false;
f_array_length_t item_first = 0;
f_array_length_t item_total = 0;
- f_array_length_t quote_start = 0;
f_array_length_t i = 0;
// use placeholders for potential quote and potential delimited quote to avoid doing things such as memmove().
#if !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_)
void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) {
- f_utf_character_t character = 0;
uint8_t increment_by = 0;
for (f_array_length_t i = 0; i < size_read; i += increment_by) {
+
increment_by = 0;
if (!*width) {
if (*width_last < *width) {
buffer_char[0] = buffer_read[i];
*width_last = 1;
- increment_by++;
+ ++increment_by;
}
if (*width > 1 && i + 1 < size_read) {
if (*width_last < *width) {
buffer_char[1] = buffer_read[i];
*width_last = 2;
- increment_by++;
+ ++increment_by;
}
if (*width > 2 && i + 2 < size_read) {
if (*width_last < *width) {
buffer_char[2] = buffer_read[i];
*width_last = 3;
- increment_by++;
+ ++increment_by;
}
if (*width > 3 && i + 3 < size_read) {
buffer_char[3] = buffer_read[i];
*width_last = 4;
- increment_by++;
+ ++increment_by;
}
}
}
}
}
- buffer->used++;
+ ++buffer->used;
*width = 0;
}
} // for
#if !defined(_di_fl_utf_file_write_) || !defined(_di_fl_utf_file_write_until_) || !defined(fl_utf_file_write_range)
f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_array_length_t total, f_array_length_t *written) {
+
*written = 0;
- f_status_t status = F_none;
f_array_length_t write_size = file.size_write > 4 ? file.size_write : 4;
f_array_length_t write_max = total;
f_array_length_t i = 0;
do {
memset(buffer_write, 0, write_size);
- for (i = 0, used = 0; used < write_size && *written + i < write_max; i++, used += width) {
+ for (i = 0, used = 0; used < write_size && *written + i < write_max; ++i, used += width) {
if (width_written < width) {
if (width_written < 2) {
buffer_write[used] = macro_f_utf_character_t_to_char_2(string[*written + i]);
- width_written++;
- used++;
+ ++width_written;
+ ++used;
}
if (width > 2 && width_written < 3) {
buffer_write[used + 1] = macro_f_utf_character_t_to_char_3(string[*written + i]);
- width_written++;
- used++;
+ ++width_written;
+ ++used;
}
if (width == 4 && width_written < 4) {
buffer_write[used + 2] = macro_f_utf_character_t_to_char_4(string[*written + i]);
- width_written++;
- used++;
+ ++width_written;
+ ++used;
}
width = 0;
f_array_length_t i = 0;
f_array_length_t j = 0;
- f_array_length_t k = 0;
bool matched[size];