commit 10b157d257d892b782cdcf56a91698f851395411
Author: Matthew Fernandez <matthew.fernandez@gmail.com>
Date:   Fri Apr 17 07:32:23 2020 -0700

    fix mismatched logging arguments
    
    This change corrects some logging calls that were passing format strings that
    did not align with their arguments. These issues were detected by tagging the
    Log() function with __attribute__((format(printf, 3, 4))).

diff --git a/src/clustal-omega.c b/src/clustal-omega.c
index f6ccfd2..c0c5d93 100644
--- a/src/clustal-omega.c
+++ b/src/clustal-omega.c
@@ -1327,7 +1327,7 @@ Align(mseq_t *prMSeq,
                 CKFREE(piOrderLR);
             if (NULL != pdSeqWeights)
                 CKFREE(pdSeqWeights);
-            Log(&rLog, LOG_INFO, "Computing new guide tree (iteration step %d)");
+            Log(&rLog, LOG_INFO, "Computing new guide tree (iteration step %d)", iIterationCounter);
             if (AlignmentOrder(&piOrderLR, &pdSeqWeights, prMSeq,
                                ((SEQTYPE_PROTEIN == prMSeq->seqtype) && (TRUE == prOpts->bUseKimura)) ? PAIRDIST_SQUIDID_KIMURA : PAIRDIST_SQUIDID, 
                                NULL, prOpts->pcDistmatOutfile,
diff --git a/src/clustal/hhalign_wrapper.c b/src/clustal/hhalign_wrapper.c
index 269fc56..a8eedff 100644
--- a/src/clustal/hhalign_wrapper.c
+++ b/src/clustal/hhalign_wrapper.c
@@ -1041,7 +1041,7 @@ HHalignWrapper(mseq_t *prMSeq, int *piOrderLR,
             int i, j; /* aux */
 
             Log(&rLog, LOG_DEBUG,
-                "merge profiles at node %d", iN, piOrderLR[riAux]);
+                "merge profiles at node %d", iN);
 
             /* iNodeCount - prMSeq->nseqs = total # of merge-nodes 
              * unless in profile/profile alignment mode
diff --git a/src/clustal/muscle_tree.c b/src/clustal/muscle_tree.c
index c4ba70d..fbb6701 100644
--- a/src/clustal/muscle_tree.c
+++ b/src/clustal/muscle_tree.c
@@ -763,10 +763,10 @@ ValidateNode(uint uNodeIndex, tree_t *tree)
     n3 = tree->m_uNeighbor3[uNodeIndex];
     
     if (NULL_NEIGHBOR == n2 && NULL_NEIGHBOR != n3) {
-        Log(&rLog, LOG_FATAL, "Tree::ValidateNode, n2=null, n3!=null", uNodeIndex);
+        Log(&rLog, LOG_FATAL, "Tree::ValidateNode(%u), n2=null, n3!=null", uNodeIndex);
     }
     if (NULL_NEIGHBOR == n3 && NULL_NEIGHBOR != n2) {
-        Log(&rLog, LOG_FATAL, "Tree::ValidateNode, n3=null, n2!=null", uNodeIndex);
+        Log(&rLog, LOG_FATAL, "Tree::ValidateNode(%u), n3=null, n2!=null", uNodeIndex);
     }
     
     if (n1 != NULL_NEIGHBOR)
@@ -1221,7 +1221,7 @@ GetGroupFromFile(FILE *fp, uint uNodeIndex, double *ptrdEdgeLength, tree_t *tree
             ;
         else if (NTT_Comma == NTT) {
             if (ungetc(',', fp)==EOF)
-                Log(&rLog, LOG_FATAL, "%s" "ungetc failed");
+                Log(&rLog, LOG_FATAL, "%s", "ungetc failed");
             return FALSE;
         } else
             Log(&rLog, LOG_FATAL, "Tree::GetGroupFromFile, expected ')' or ',', got '%s'", szToken);
@@ -1248,7 +1248,7 @@ GetGroupFromFile(FILE *fp, uint uNodeIndex, double *ptrdEdgeLength, tree_t *tree
         return TRUE;
     }
     if (ungetc(c, fp)==EOF)
-        Log(&rLog, LOG_FATAL, "%s" "ungetc failed");
+        Log(&rLog, LOG_FATAL, "%s", "ungetc failed");
     
     return FALSE;
 }
@@ -1293,7 +1293,7 @@ FileSkipWhiteX(FILE *fp)
             return TRUE;
         if (!isspace(c)) {
             if (ungetc(c, fp)==EOF)
-                Log(&rLog, LOG_FATAL, "%s" "ungetc failed");
+                Log(&rLog, LOG_FATAL, "%s", "ungetc failed");
             break;
         }
     }
@@ -1383,7 +1383,7 @@ GetToken(FILE *fp, char szToken[], uint uBytes)
         case NTT_String:
             if (0 != strchr("():;,", c)) {
                 if (ungetc(c, fp)==EOF)
-                    Log(&rLog, LOG_FATAL, "%s" "ungetc failed");
+                    Log(&rLog, LOG_FATAL, "%s", "ungetc failed");
                 return NTT_String;
             }
             if (isspace(c))
diff --git a/src/clustal/seq.c b/src/clustal/seq.c
index 27cca14..e2ef756 100644
--- a/src/clustal/seq.c
+++ b/src/clustal/seq.c
@@ -471,7 +471,7 @@ ReadSequences(mseq_t *prMSeq, char *seqfile,
         }
         if ((int)strlen(cur_seq)>iMaxSeqLen) {
             Log(&rLog, LOG_ERROR, "Sequence '%s' has %d residues and is therefore longer than allowed (max. sequence length is %d)",
-                  cur_sqinfo.name, strlen(cur_seq), iMaxSeqLen);
+                  cur_sqinfo.name, (int)strlen(cur_seq), iMaxSeqLen);
             return -1;
         }
         if ((int)strlen(cur_seq)==0) {
diff --git a/src/clustal/util.c b/src/clustal/util.c
index f3e0d89..d31df9b 100644
--- a/src/clustal/util.c
+++ b/src/clustal/util.c
@@ -480,7 +480,7 @@ FileIsWritable(char *pcFileName)
     } else {
         bIsWritable = TRUE;
         if (0 != fclose(prFilePointer)) {
-            Log(&rLog, LOG_ERROR, "Couldn't close temporily created file %s. Expect trouble...");
+            Log(&rLog, LOG_ERROR, "Couldn't close temporily created file %s. Expect trouble...", pcFileName);
         }
     }
     
@@ -495,7 +495,7 @@ FileIsWritable(char *pcFileName)
      */
     if (FALSE==bFileAlreadyExisted && TRUE==bIsWritable) {
         if (0 != remove(pcFileName)) {
-            Log(&rLog, LOG_ERROR, "Removing of temporarily created file %s failed. Expect trouble...");
+            Log(&rLog, LOG_ERROR, "Removing of temporarily created file %s failed. Expect trouble...", pcFileName);
         }
     }
     return bIsWritable; 
