diff --git a/core/modules/user/src/Form/UserPermissionsForm.php b/core/modules/user/src/Form/UserPermissionsForm.php
index 01e8755..7a06219 100644
--- a/core/modules/user/src/Form/UserPermissionsForm.php
+++ b/core/modules/user/src/Form/UserPermissionsForm.php
@@ -100,7 +100,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       '#value' => $role_names,
     );
     // Render role/permission overview:
-    $options = array();
     $hide_descriptions = system_admin_compact_mode();
 
     $form['system_compact_link'] = array(
@@ -145,7 +144,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
           'restrict access' => FALSE,
           'warning' => !empty($perm_item['restrict access']) ? $this->t('Warning: Give to trusted roles only; this permission has security implications.') : '',
         );
-        $options[$perm] = $perm_item['title'];
         $form['permissions'][$perm]['description'] = array(
           '#type' => 'inline_template',
           '#template' => '<div class="permission"><span class="title">{{ title }}</span>{% if description or warning %}<div class="description">{% if warning %}<em class="permission-warning">{{ warning }}</em> {% endif %}{{ description }}</div>{% endif %}</div>',
@@ -158,7 +156,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
           $form['permissions'][$perm]['description']['#context']['description'] = $perm_item['description'];
           $form['permissions'][$perm]['description']['#context']['warning'] = $perm_item['warning'];
         }
-        $options[$perm] = '';
         foreach ($role_names as $rid => $name) {
           $form['permissions'][$perm][$rid] = array(
             '#title' => $name . ': ' . $perm_item['title'],
diff --git a/core/modules/user/src/Tests/UserAdminTest.php b/core/modules/user/src/Tests/UserAdminTest.php
index 60fd56b..8d4a22b 100644
--- a/core/modules/user/src/Tests/UserAdminTest.php
+++ b/core/modules/user/src/Tests/UserAdminTest.php
@@ -174,8 +174,8 @@ function testNotificationEmailAddress() {
       ->save();
     // Register a new user account.
     $edit = array();
-    $edit['name'] = $name = $this->randomMachineName();
-    $edit['mail'] = $mail = $edit['name'] . '@example.com';
+    $edit['name'] = $this->randomMachineName();
+    $edit['mail'] = $edit['name'] . '@example.com';
     $this->drupalPostForm('user/register', $edit, t('Create new account'));
     $subject = 'Account details for ' . $edit['name'] . ' at ' . $system->get('name') . ' (pending admin approval)';
     // Ensure that admin notification mail is sent to the configured
diff --git a/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php b/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
index 4a83c41..4022972 100644
--- a/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
+++ b/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
@@ -135,7 +135,7 @@ protected function buildAccountForm($operation) {
     $entity = $this->container->get('entity.manager')
       ->getStorage($entity_type)
       ->create($fields);
-    $form_object = $this->container->get('entity.manager')
+    $this->container->get('entity.manager')
       ->getFormObject($entity_type, $operation)
       ->setEntity($entity);
 
