summaryrefslogtreecommitdiff
path: root/src/pam_xdg.cpp
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2025-07-31 08:59:36 -0400
committerJohn Turner <jturner.usa@gmail.com>2025-07-31 08:59:36 -0400
commit5ba53a5247f0d60665f7f18afb03acd1b2cffa34 (patch)
tree4e4ce14670814ba0939f3405fde5335a2f6dfecb /src/pam_xdg.cpp
parent9b7498cca274d6ee5ca6ca9575dbcdc49b5bf33c (diff)
downloadpam_xdg-5ba53a5247f0d60665f7f18afb03acd1b2cffa34.tar.gz
use maybe_unused instead of gnu::unused
Diffstat (limited to 'src/pam_xdg.cpp')
-rw-r--r--src/pam_xdg.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/pam_xdg.cpp b/src/pam_xdg.cpp
index 6b0278c..9f4118e 100644
--- a/src/pam_xdg.cpp
+++ b/src/pam_xdg.cpp
@@ -28,9 +28,8 @@ void open_db(sqlite3 **db, const std::filesystem::path &path, int flags) {
}
void init_db(sqlite3 *db) {
- auto rc = sqlite3_exec(
- db, "CREATE TABLE SESSIONS(USERNAME TEXT, LOGINS INT)",
- nullptr, nullptr, nullptr);
+ auto rc = sqlite3_exec(db, "CREATE TABLE SESSIONS(USERNAME TEXT, LOGINS INT)",
+ nullptr, nullptr, nullptr);
if (rc != SQLITE_OK) {
throw std::runtime_error(
@@ -223,9 +222,9 @@ void create_directory(const std::filesystem::path &path, std::uint16_t owner,
} // namespace pam_xdg
extern "C" int pam_sm_open_session(pam_handle_t *pamh,
- [[gnu::unused]] int flags,
- [[gnu::unused]] int argc,
- [[gnu::unused]] const char **argv) {
+ [[maybe_unused]] int flags,
+ [[maybe_unused]] int argc,
+ [[maybe_unused]] const char **argv) {
const void *data;
if (pam_get_item(pamh, PAM_USER, &data) != PAM_SUCCESS) {
@@ -293,9 +292,9 @@ extern "C" int pam_sm_open_session(pam_handle_t *pamh,
}
extern "C" int pam_sm_close_session(pam_handle_t *pam,
- [[gnu::unused]] int flags,
- [[gnu::unused]] int argc,
- [[gnu::unused]] const char **argv) {
+ [[maybe_unused]] int flags,
+ [[maybe_unused]] int argc,
+ [[maybe_unused]] const char **argv) {
const void *data;
if (pam_get_item(pam, PAM_USER, &data) != PAM_SUCCESS) {