mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-08-03 09:16:13 -04:00
Fix warnings with GCC 9.2.0
This commit is contained in:
parent
26bbf11772
commit
5f9601e163
@ -61,7 +61,7 @@ fat32::cluster_entry* init_entry(fat32::cluster_entry* entry_ptr, std::string_vi
|
||||
|
||||
//Compute the checksum of 8.3 Entry
|
||||
char sum = 0;
|
||||
for(int c = 0; c < 11; ++c){
|
||||
for(unsigned int c = 0; c < 11; ++c){
|
||||
char v = c < len ? name[c] : ' ';
|
||||
sum = ((sum & 1) ? 0x80 : 0) + (sum >> 1) + v;
|
||||
}
|
||||
@ -1078,7 +1078,7 @@ std::vector<vfs::file> fat32::fat32_file_system::files(uint32_t cluster_number){
|
||||
|
||||
while(!end_reached){
|
||||
if(!read_sectors(cluster_lba(cluster_number), fat_bs->sectors_per_cluster, cluster.get())){
|
||||
return std::move(files);
|
||||
return files;
|
||||
}
|
||||
|
||||
size_t position = 0;
|
||||
@ -1204,19 +1204,19 @@ std::vector<vfs::file> fat32::fat32_file_system::files(uint32_t cluster_number){
|
||||
|
||||
//If there are no more cluster, return false
|
||||
if(!cluster_number){
|
||||
return std::move(files);
|
||||
return files;
|
||||
}
|
||||
|
||||
//The block is corrupted
|
||||
if(cluster_number == CLUSTER_CORRUPTED){
|
||||
return std::move(files);
|
||||
return files;
|
||||
}
|
||||
}
|
||||
|
||||
++cluster_position;
|
||||
}
|
||||
|
||||
return std::move(files);
|
||||
return files;
|
||||
}
|
||||
|
||||
//TODO use expected here
|
||||
|
@ -248,7 +248,7 @@ std::string vsprintf(const std::string& format, va_list va){
|
||||
}
|
||||
}
|
||||
|
||||
return std::move(s);
|
||||
return s;
|
||||
}
|
||||
|
||||
std::string sprintf(const std::string& format, ...){
|
||||
@ -259,7 +259,7 @@ std::string sprintf(const std::string& format, ...){
|
||||
|
||||
va_end(va);
|
||||
|
||||
return std::move(s);
|
||||
return s;
|
||||
}
|
||||
|
||||
void vprintf(const std::string& format, va_list va){
|
||||
|
@ -601,7 +601,7 @@ tlib::socket tlib::socket::accept() {
|
||||
sock._bound = false;
|
||||
sock.error_code = 0;
|
||||
|
||||
return std::move(sock);
|
||||
return sock;
|
||||
} else {
|
||||
error_code = status.error();
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ template<typename T>
|
||||
struct default_delete {
|
||||
constexpr default_delete() = default;
|
||||
|
||||
constexpr default_delete(const default_delete&) {}
|
||||
constexpr default_delete(const default_delete&) = default;
|
||||
|
||||
void operator()(T* ptr) const {
|
||||
static_assert(sizeof(T) > 0, "Type must be complete");
|
||||
@ -27,7 +27,7 @@ template<typename T>
|
||||
struct default_delete<T[]> {
|
||||
constexpr default_delete() = default;
|
||||
|
||||
constexpr default_delete(const default_delete&) {}
|
||||
constexpr default_delete(const default_delete&) = default;
|
||||
|
||||
void operator()(T* ptr) const {
|
||||
static_assert(sizeof(T) > 0, "Type must be complete");
|
||||
|
@ -368,7 +368,7 @@ public:
|
||||
|
||||
copy += c;
|
||||
|
||||
return move(copy);
|
||||
return copy;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -645,7 +645,7 @@ basic_string<C> operator+(const basic_string<C>& lhs, const basic_string<C>& rhs
|
||||
basic_string<C> result;
|
||||
result += lhs;
|
||||
result += rhs;
|
||||
return std::move(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
template<typename C>
|
||||
@ -653,7 +653,7 @@ basic_string<C> operator+(const C* lhs, const basic_string<C>& rhs){
|
||||
basic_string<C> result;
|
||||
result += lhs;
|
||||
result += rhs;
|
||||
return std::move(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
template<typename C>
|
||||
@ -661,7 +661,7 @@ basic_string<C> operator+(const basic_string<C>& lhs, const C* rhs){
|
||||
basic_string<C> result;
|
||||
result += lhs;
|
||||
result += rhs;
|
||||
return std::move(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
//Operators
|
||||
@ -852,7 +852,7 @@ std::vector<std::basic_string<Char>> split(const std::basic_string<Char>& s, cha
|
||||
parts.push_back(current);
|
||||
}
|
||||
|
||||
return std::move(parts);
|
||||
return parts;
|
||||
}
|
||||
|
||||
template<typename Char>
|
||||
@ -901,7 +901,7 @@ inline std::string to_string<uint64_t>(const uint64_t& value){
|
||||
s += buffer[i];
|
||||
}
|
||||
|
||||
return std::move(s);
|
||||
return s;
|
||||
}
|
||||
|
||||
template<>
|
||||
@ -909,7 +909,7 @@ inline std::string to_string<int64_t>(const int64_t& value){
|
||||
if(value < 0){
|
||||
std::string s("-");
|
||||
s += to_string(static_cast<uint64_t>(-value));
|
||||
return std::move(s);
|
||||
return s;
|
||||
} else {
|
||||
return to_string(static_cast<uint64_t>(value));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user