Skip to content

Commit

Permalink
odbcBackend: Add check for HAVE_LOGGER to function
Browse files Browse the repository at this point in the history
- function `logChangedKeys` is only built when logging and debugging is active
  • Loading branch information
flo91 committed Jun 24, 2023
1 parent dfe2571 commit e9aea4a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/plugins/backend_odbc/backend_odbc_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ static SQLLEN insertOrUpdateRows (SQLHSTMT sqlStmt, const KeySet * ks, const str
}


#ifdef HAVE_LOGGER
#ifdef DEBUG
#if DEBUG
/**
Expand Down Expand Up @@ -1058,6 +1059,7 @@ static void logChangedKeys (ElektraDiff * diffSet, Key * parentKey)
}
#endif
#endif
#endif

/**
* @brief Change the data in the ODBC data source so that it represents the state the is given in @ks.
Expand Down Expand Up @@ -1121,9 +1123,14 @@ SQLLEN storeKeysInDataSource (struct odbcSharedData * sharedData, KeySet * ks, K
return 0;
}

#ifdef HAVE_LOGGER
#ifdef DEBUG
#if DEBUG
logChangedKeys (diffSet, parentKey);
#endif
#endif
#endif

/* 3. Execute the DELETE, UPDATE, and INSERT queries based on the calculated diff */
SQLHSTMT sqlStmt = NULL;
SQLLEN sumAffectedRows = 0;
Expand Down

0 comments on commit e9aea4a

Please sign in to comment.