-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
From 125535cc159e547526458c9523826b555b5b59bc Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Kirill=20M=C3=BCller?= <[email protected]> | ||
Date: Wed, 22 Jan 2025 11:40:18 +0100 | ||
Subject: [PATCH] Correctly fix uninitialized warning | ||
|
||
--- | ||
src/duckdb/src/main/connection.cpp | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/duckdb/src/main/connection.cpp b/src/duckdb/src/main/connection.cpp | ||
index a08874fcb..fe6fd7247 100644 | ||
--- a/src/duckdb/src/main/connection.cpp | ||
+++ b/src/duckdb/src/main/connection.cpp | ||
@@ -28,10 +28,10 @@ Connection::Connection(DatabaseInstance &database) | ||
} | ||
|
||
Connection::Connection(DuckDB &database) : Connection(*database.instance) { | ||
- warning_cb = nullptr; | ||
+ // Initialization of warning_cb happens in the other constructor | ||
} | ||
|
||
-Connection::Connection(Connection &&other) noexcept { | ||
+Connection::Connection(Connection &&other) noexcept : warning_cb(nullptr) { | ||
std::swap(context, other.context); | ||
std::swap(warning_cb, other.warning_cb); | ||
} | ||
-- | ||
2.48.1 | ||
|