File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ auto JSON::operator-=(const JSON &substractive) -> JSON & {
359
359
return false ;
360
360
} else if (this ->is_real ()) {
361
361
const auto value{this ->to_real ()};
362
- Real integral;
362
+ Real integral = 0.0 ;
363
363
return !std::isinf (value) && !std::isnan (value) &&
364
364
std::modf (value, &integral) == 0.0 ;
365
365
} else {
@@ -659,14 +659,14 @@ JSON::at(const String &key,
659
659
const auto dividend_value{this ->as_real ()};
660
660
661
661
// Every real number that represents an integral is divisible by 0.5.
662
- Real dividend_integral;
662
+ Real dividend_integral = 0 ;
663
663
if (std::modf (dividend_value, ÷nd_integral) == 0.0 &&
664
664
divisor_value == 0.5 ) {
665
665
return true ;
666
666
}
667
667
668
668
const auto division{dividend_value / divisor_value};
669
- Real integral;
669
+ Real integral = 0 ;
670
670
return !std::isinf (division) && !std::isnan (division) &&
671
671
std::modf (division, &integral) == 0.0 ;
672
672
}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ static auto uri_normalize(UriUriA *uri) -> void {
21
21
}
22
22
23
23
static auto uri_to_string (const UriUriA *const uri) -> std::string {
24
- int size;
24
+ int size = 0 ;
25
25
if (uriToStringCharsRequiredA (uri, &size) != URI_SUCCESS) {
26
26
throw sourcemeta::core::URIError{" Could not determine URI size" };
27
27
}
@@ -49,7 +49,7 @@ static auto uri_text_range(const UriTextRangeA *const range)
49
49
}
50
50
51
51
static auto uri_parse (const std::string &data, UriUriA *uri) -> void {
52
- const char *error_position;
52
+ const char *error_position = nullptr ;
53
53
switch (uriParseSingleUriA (uri, data.c_str (), &error_position)) {
54
54
case URI_ERROR_SYNTAX:
55
55
// TODO: Test the positions of this error
You can’t perform that action at this time.
0 commit comments