diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c
index f50ee9d29f..34d73ad442 100644
--- a/contrib/amcheck/verify_heapam.c
+++ b/contrib/amcheck/verify_heapam.c
@@ -1009,7 +1009,7 @@ check_tuple_header(HeapCheckContext *ctx)
  * TOAST tuples -- are eligible for pruning.
  *
  * Sets *xmin_commit_status_ok to true if the commit status of xmin is known
- * and false otherwise. If it's set to true, then also set *xid_commit_status
+ * and false otherwise. If it's set to true, then also set *xmin_commit_status
  * to the actual commit status.
  */
 static bool
diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c
index 6efdefb591..5baea7535b 100644
--- a/src/backend/backup/basebackup.c
+++ b/src/backend/backup/basebackup.c
@@ -254,7 +254,7 @@ perform_base_backup(basebackup_options *opt, bbsink *sink)
 
 	total_checksum_failures = 0;
 
-	/* Allocate backup related varilables. */
+	/* Allocate backup related variables. */
 	backup_state = (BackupState *) palloc0(sizeof(BackupState));
 	tablespace_map = makeStringInfo();
 
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index ee6244f9bc..1fa689052e 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -2046,7 +2046,7 @@ ExtendBufferedRelShared(ExtendBufferedWhat eb,
 	io_start = pgstat_prepare_io_time();
 
 	/*
-	 * Note: if smgzerorextend fails, we will end up with buffers that are
+	 * Note: if smgrzeroextend fails, we will end up with buffers that are
 	 * allocated but not marked BM_VALID.  The next relation extension will
 	 * still select the same block number (because the relation didn't get any
 	 * longer on disk) and so future attempts to extend the relation will find
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 45dc2273b7..c5a6babccc 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -4825,7 +4825,7 @@ RoleMembershipCacheCallback(Datum arg, int cacheid, uint32 hashvalue)
  * Get a list of roles that the specified roleid is a member of
  *
  * Type ROLERECURSE_MEMBERS recurses through all grants; ROLERECURSE_PRIVS
- * recurses only through inheritable grants; and ROLERECURSE_SETROLe recurses
+ * recurses only through inheritable grants; and ROLERECURSE_SETROLE recurses
  * only through grants with set_option.
  *
  * Since indirect membership testing is relatively expensive, we cache
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 88f97ea246..42b90e4d4f 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -1382,7 +1382,7 @@ MemoryContextAllocAligned(MemoryContext context,
 	alloc_size = size + PallocAlignedExtraBytes(alignto);
 
 #ifdef MEMORY_CONTEXT_CHECKING
-	/* ensure there's space for a sentinal byte */
+	/* ensure there's space for a sentinel byte */
 	alloc_size += 1;
 #endif
 
diff --git a/src/bin/pg_basebackup/nls.mk b/src/bin/pg_basebackup/nls.mk
index 8d28e249de..fc475003e8 100644
--- a/src/bin/pg_basebackup/nls.mk
+++ b/src/bin/pg_basebackup/nls.mk
@@ -18,5 +18,5 @@ GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) \
                    ../../common/file_utils.c \
                    ../../fe_utils/option_utils.c \
                    ../../fe_utils/recovery_gen.c
-GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) simple_prompt tar_set_error
+GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) simple_prompt
 GETTEXT_FLAGS    = $(FRONTEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/include/regex/regcustom.h b/src/include/regex/regcustom.h
index bedee1e9ca..af0fe97c79 100644
--- a/src/include/regex/regcustom.h
+++ b/src/include/regex/regcustom.h
@@ -44,7 +44,7 @@
 
 #include "mb/pg_wchar.h"
 
-#include "miscadmin.h"			/* needed by stacktoodeep */
+#include "miscadmin.h"			/* needed by rstacktoodeep */
 
 
 /* overrides for regguts.h definitions, if any */
diff --git a/src/test/modules/test_slru/test_slru.c b/src/test/modules/test_slru/test_slru.c
index 622f43da04..ae21444c47 100644
--- a/src/test/modules/test_slru/test_slru.c
+++ b/src/test/modules/test_slru/test_slru.c
@@ -50,9 +50,6 @@ static SlruCtlData TestSlruCtlData;
 static shmem_request_hook_type prev_shmem_request_hook = NULL;
 static shmem_startup_hook_type prev_shmem_startup_hook = NULL;
 
-/* LWLock name */
-const char	test_tranche_name[] = "test_slru_tranche";
-
 static bool
 test_slru_scan_cb(SlruCtl ctl, char *filename, int segpage, void *data)
 {
