common: Fixed warnings the broke Windows build (with /WX)
This commit is contained in:
parent
e349d348a5
commit
db5bac4c7a
1 changed files with 3 additions and 3 deletions
|
|
@ -163,7 +163,7 @@ int str2version(const char *str, struct bladerf_version *version)
|
|||
if (errno != 0 || tmp > UINT16_MAX || end == start || *end != '.') {
|
||||
return -1;
|
||||
}
|
||||
version->major = tmp;
|
||||
version->major = (uint16_t)tmp;
|
||||
|
||||
/* Minor version */
|
||||
if (end[0] == '\0' || end[1] == '\0') {
|
||||
|
|
@ -175,7 +175,7 @@ int str2version(const char *str, struct bladerf_version *version)
|
|||
if (errno != 0 || tmp > UINT16_MAX || end == start || *end != '.') {
|
||||
return -1;
|
||||
}
|
||||
version->minor = tmp;
|
||||
version->minor = (uint16_t)tmp;
|
||||
|
||||
/* Patch version */
|
||||
if (end[0] == '\0' || end[1] == '\0') {
|
||||
|
|
@ -188,7 +188,7 @@ int str2version(const char *str, struct bladerf_version *version)
|
|||
(*end != '-' && *end != '\0')) {
|
||||
return -1;
|
||||
}
|
||||
version->patch = tmp;
|
||||
version->patch = (uint16_t)tmp;
|
||||
|
||||
version->describe = str;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue