diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2020-08-11 00:10:28 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-12 20:40:59 +0200 |
commit | 5fa771c8b23b060c1936d3e17634daad1b5e3e5f (patch) | |
tree | 0c6248e9dc6ad3939f2e10299aae2e557cbdbcea /Libraries/LibPCIDB/Database.cpp | |
parent | 1396ce8a9b85cd08de5273febca2113d8b2e1dc2 (diff) | |
download | serenity-5fa771c8b23b060c1936d3e17634daad1b5e3e5f.zip |
LibPCIDB: Mark compilation-unit-only functions as static
This enables a nice warning in case a function becomes dead code.
Diffstat (limited to 'Libraries/LibPCIDB/Database.cpp')
-rw-r--r-- | Libraries/LibPCIDB/Database.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Libraries/LibPCIDB/Database.cpp b/Libraries/LibPCIDB/Database.cpp index e74470fd9a..83c65abb6b 100644 --- a/Libraries/LibPCIDB/Database.cpp +++ b/Libraries/LibPCIDB/Database.cpp @@ -106,7 +106,7 @@ const StringView Database::get_programming_interface(u8 class_id, u8 subclass_id return programming_interface.value()->name; } -u8 parse_hex_digit(char digit) +static u8 parse_hex_digit(char digit) { if (digit >= '0' && digit <= '9') return digit - '0'; @@ -115,7 +115,7 @@ u8 parse_hex_digit(char digit) } template<typename T> -T parse_hex(StringView str, size_t count) +static T parse_hex(StringView str, size_t count) { ASSERT(str.length() >= count); @@ -180,7 +180,6 @@ int Database::init() auto lines = m_view.split_view('\n'); - for (auto& line : lines) { if (line.length() < 2 || line[0] == '#') continue; @@ -243,7 +242,6 @@ int Database::init() m_ready = true; - return 0; } |