]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4483] addressed review comments
authorRazvan Becheriu <razvan@isc.org>
Thu, 21 May 2026 18:23:35 +0000 (21:23 +0300)
committerRazvan Becheriu <razvan@isc.org>
Fri, 22 May 2026 13:15:04 +0000 (13:15 +0000)
src/hooks/dhcp/mysql/mysql_host_data_source.cc
src/hooks/dhcp/pgsql/pgsql_host_data_source.cc
src/hooks/dhcp/pgsql/pgsql_legal_log.cc
tools/valgrind_generate_suppression_file.sh

index 30367e0ea0cc681bf726c759bfcc9a30be369e74..16740f4fe6941aae6cdf77b99c7dc15ba514156d 100644 (file)
@@ -908,6 +908,8 @@ private:
             memset(formatted_value_, 0, sizeof(formatted_value_));
             memset(space_, 0, sizeof(space_));
             memset(user_context_, 0, sizeof(user_context_));
+
+            static_assert(8 < OPTION_COLUMNS, "8 < OPTION_COLUMNS");
         }
 
         /// @brief Returns identifier of the currently processed option.
index 836aee9269dcdb64e03c83777a433230e6e24b56..350ee6efb3d0400cc4d3d3f7f1cbb2e3ca65780a 100644 (file)
@@ -139,7 +139,7 @@ public:
         columns_[DHCP4_BOOT_FILE_NAME_COL] = "dhcp4_boot_file_name";
         columns_[AUTH_KEY_COL] = "auth_key";
 
-        static_assert(12 < HOST_COLUMNS, "12 < HOST_COLUMNS");
+        static_assert(13 < HOST_COLUMNS, "13 < HOST_COLUMNS");
     };
 
     /// @brief Virtual destructor.
@@ -739,6 +739,8 @@ private:
             columns[cancelled_index_] = "cancelled";
             columns[user_context_index_] = "user_context";
             columns[client_classes_index_] = "client_classes";
+
+            static_assert(8 < OPTION_COLUMNS, "8 < OPTION_COLUMNS");
         }
 
     private:
index 1b5e7dfea20a439f4ee1a72c3230a39187ad971b..c2ad59345e59795897358f1b01a4fba8b6c8eae9 100644 (file)
@@ -63,10 +63,9 @@ public:
     /// @brief Constructor
     PgSqlLegLExchange() : address_(""), log_("") {
 
-        static_assert(0 < LOG_COLUMNS, "0 < LOG_COLUMNS");
-
         // Set the column names (for error messages)
         columns_.push_back("log");
+        static_assert(1 < LOG_COLUMNS, "1 < LOG_COLUMNS");
     }
 
     /// @brief Destructor
index 8968e4a8c125e7d5ba63785f1a340e97458bbae0..4d4d06038b4e5a699fe791f4aa768c530f6a9fdf 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+set -eu
+
 # run unittests
 # ./meson.sh test -C build --setup valgrind_gen_suppressions
 for i in $(find build | grep "valgrind-supp-" | grep -v "txt\.supp")
@@ -12,7 +14,7 @@ do
        # remove useless data
        xmlstarlet sel -t -v "/valgrindoutput/error/suppression/rawtext" "$i" | grep "\S" | sed 's/&lt;/</g; s/&gt;/>/g; s/&amp;/\&/g; s/&quot;/"/g; s/&apos;/'"'"'/g' > "$i-txt.supp"
        # extract the binary path and name
-       found_in_path=$(grep "<exe>.*</exe>" "$i" | grep -v "valgrind" | xmlstarlet sel -t -v "/exe" | sed "s|.*src|src|")
+       found_in_path=$(xmlstarlet sel -t -v "/valgrindoutput/args/argv/exe" "$i" | sed "s|.*src|src|")
        # insert a comment with the binary path and name
        sed -i "s|<insert_a_suppression_name_here>|<insert_a_suppression_name_here>\n   # detected in $found_in_path|g" "$i-txt.supp"
        # split the file