summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {