From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com [209.85.128.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 496A62BD015 for ; Mon, 24 Nov 2025 18:15:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764008136; cv=none; b=IKR5thvPDzGHbThWLhlmtn4kRU6EQYJpuHIVqZa9aN8e34zsh6ybi7tp85yl9waEgfEkOBYS5NITisPMs9UKT3qyqzGQrDUWIGLc/x3s70P+vrkxTMfJit0YeZCmu2/r766XOZoTewpjZY3d7FMm630q0sUINIGh0KdGiXdU0MI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764008136; c=relaxed/simple; bh=9OsOtu2FdRcdJ07h5ePZqFdT7LILIFGuF6mCtnACmDk=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: Mime-Version:Content-Type; b=Io/+maJ4v8uFT6hQT0sKX3w+XeTKMwVJlG8N2S130SREiwDPYFpK+1Kh9cCNQ+9o9kSSpE2EqIzD7s1m/TE5iy0Eogf+fq3hrTZpvvoaB0RCbRJ4Ai1iNhAIokoWAuLDuvfrN7T7DZGCytNdmj1JUl8bIqOhb20U1cwaYCMVENY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=F0DI7Gcj; arc=none smtp.client-ip=209.85.128.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F0DI7Gcj" Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-787c9f90eccso47554017b3.3 for ; Mon, 24 Nov 2025 10:15:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764008134; x=1764612934; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=ocgYXOVPq3H23c7s3bIbF+RIkWJqwfLZLsXUE58QTME=; b=F0DI7GcjN2Zh6kP52XzPrWWK6vpuf1FxNx5vvkjnRgGw8bfowb63tX768OP3OD3zfB fPFU86xibhiaLPmuxnbvSD7owo+a95j4I6lFfKt/ORyg2aIubCQpj5m9jYoA/TK/hNm9 T8mUnumI0aiC+hxLcCHPuyU1Yiprx3wHYnYpqp7p4OIRnFqDpjH/Cllev1RAm866pnst RhU+JtGnli4K64yoMczcyeppe/FfQmsPRayxbfs+h/vWPTe8HWg2U6DFbfQV3GvH3Wbl V3kxzPEsAeD8JmqgWI6CyHg/1v0zrWkFw/AvrkNevhlK025GcklTuf6VD8PIAdK6U8gN zkHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764008134; x=1764612934; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ocgYXOVPq3H23c7s3bIbF+RIkWJqwfLZLsXUE58QTME=; b=XwU5BZS7I7jroJXYPM0+KULqpsEulo3LA1/2HwN/i/EGoeHLItdqrqfLJ9LEbmPC0Z Cgoo0/X7R4v+y3kiSSZ7wi+xpRE42kxQjJ6NqvLBsvzztVgR+kw/BYk+ErbiLM0rolAb FIai+UpnThEhbSsedaMM54rHPgUEiF0DaoQkJl1cfwuRH+35sxo6sMIVF2VeFoCojzK/ cEci4CkYScgRMvES4k1GDmZUENIGRAaBBzqh2ubcRKZ7hMNw1JCpdhJcCFeimWR5HEdC 4vGCy0IDLXyAROUp7rRCV6d5Hf/6/ewPu4lm6lZhdNrsmUNB7rUDHt/eG3EdwPwUJxYl 4C3w== X-Forwarded-Encrypted: i=1; AJvYcCUxEjt50m5pzoP/Rxwmt+tIaQ6ZrANnH1rLJhb0KQVZ4GAFzGdzlqToGq8BAVIjs2LelhDSTJj9jR7Ts8w=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5BSKrB6ABlh+vcbyb1lZDfDFY3n+ioWYd0Z8I00d1ubL4gafD FOWzjP/ygwrVRNkimdHNQgI8XgO3MTdPzZdrV+Jk6UbvKvAT+1lapVq6 X-Gm-Gg: ASbGnct+t9BbLsG0mE1RS6/fckf/e1cOux61FV37+o6ndh/EadevKHMCVXDdz/bWbB1 66l7HMPjwEPaFo/558/S1In1AU/APqefySvQkuVoRni+l/7XT2Vgt9L9pWG7KVcpKYX3kUn4EbE iiurXLP+X0RiYyNwb2VFDr0QJ9dKKCUbW5jV2bdNZbzb97ztJuPIHgTJeVQPINdJLLb6JT3yMfT LRoJpk1ZjLg91va1YeB5FJi8vQvQ5hBo/E6FFfzs0vD6CoQjs78wKNmL6LdcthsfPA/x7SiQybm kpJgyFoikJU4HqHFcBUgak+CS5dXSG0KeFXAuMVHJCCi6R+LdhtLWBSPUzje4+sanSez4D+gRfm oSqE8eIn58eS/uTuqibW30KuFQ2sPkj8kNTbwzjKMdAXGcwG0STSsi8602hVJu1j6FHFBp9ZpXa L28SggT1jGvgqoE9T95CunRCYpT5TErLzunFTJLe8GRZ0fgEsovaS1N51PMmuIGNHKO6g= X-Google-Smtp-Source: AGHT+IHKw38JYHIxZFzyhwOjV8GuTsmYuY4+zL8F9XRTar88RbjKnm9PRPGZuonaN2Z6WT66KIVDGg== X-Received: by 2002:a05:690c:4482:b0:786:a185:13b6 with SMTP id 00721157ae682-78a8b4aec25mr105084257b3.22.1764008134312; Mon, 24 Nov 2025 10:15:34 -0800 (PST) Received: from gmail.com (116.235.236.35.bc.googleusercontent.com. [35.236.235.116]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-78a798a5decsm46985517b3.21.2025.11.24.10.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Nov 2025 10:15:33 -0800 (PST) Date: Mon, 24 Nov 2025 13:15:33 -0500 From: Willem de Bruijn To: Ankit Khushwaha , Willem de Bruijn Cc: Jason Xing , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: In-Reply-To: References: <20251124161324.16901-1-ankitkhushwaha.linux@gmail.com> Subject: Re: [PATCH] selftests/net: initialize char variable to null Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Ankit Khushwaha wrote: > On Mon, Nov 24, 2025 at 12:46:52PM -0500, Willem de Bruijn wrote: > > Ankit Khushwaha wrote: > > > char variable in 'so_txtime.c' & 'txtimestamp.c' left uninitilized > > > by when switch default case taken. raises following warning. > > > > > > txtimestamp.c:240:2: warning: variable 'tsname' is used uninitialized > > > whenever switch default is taken [-Wsometimes-uninitialized] > > > > > > so_txtime.c:210:3: warning: variable 'reason' is used uninitialized > > > whenever switch default is taken [-Wsometimes-uninitialized] > > > > > > initialize these variables to NULL to fix this. > > > > > > Signed-off-by: Ankit Khushwaha > > > > These are false positives as the default branches in both cases exit > > the program with error(..). > > > > Since we do not observe these in normal kernel compilations: are you > > enabling non-standard warnings? > > Hi Willem, > > this warning appeared while building the 'tools/testing/selftests/net' > multiple times. > Cmd used to build > make -C tools/testing/selftests/net CC=clang V=1 -j8 > > while test building by "make -C tools/testing/selftests/ CC=clang V=1 > -j8" doesn't raises these warning. This does not reproduce for me. Can you share the full clang command that V=1 outputs, as well as the output oof clang --version.