Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-14334

Unused variable inside __wti_txn_log_commit

    • Storage Engines, Storage Engines - Transactions
    • 1
    • Transactions - 2025-05-09

      The following code inside txn_log.c shows no usage of an argument that is passed into the function follow:

      /*
       * __wti_txn_log_commit --
       *     Write the operations of a transaction to the log at commit time.
       */
      int
      __wti_txn_log_commit(WT_SESSION_IMPL *session, const char *cfg[])
      {
          WT_TXN *txn;
      
          WT_UNUSED(cfg);
          txn = session->txn;
          /*
           * If there are no log records there is nothing to do.
           */
          if (txn->logrec == NULL)
              return (0);
      
          /* Write updates to the log. */
          return (__wt_log_write(session, txn->logrec, NULL, txn->txn_logsync));
      }
      

      This ticket will remove the unused cfg variable.

            Assignee:
            alana.huang@mongodb.com Alana Huang
            Reporter:
            jie.chen@mongodb.com Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: