svn commit: r1920496 - /subversion/trunk/subversion/libsvn_subr/sysinfo.c

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: rinrab
Date: Fri Sep  6 12:10:35 2024
New Revision: 1920496

URL: http://svn.apache.org/viewvc?rev=1920496&view=rev
Log:
In the trunk, following-up to r1919659:

Move release_name declaration to the top, to prevent warning about mixed
declarations on Linux with extra-checks enabled.

* subversion/libsvn_subr/sysinfo.c
  (linux_release_name): Declare release_name at the top of the block.

Modified:
    subversion/trunk/subversion/libsvn_subr/sysinfo.c

Modified: subversion/trunk/subversion/libsvn_subr/sysinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sysinfo.c?rev=1920496&r1=1920495&r2=1920496&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sysinfo.c Fri Sep  6 12:10:35 2024
@@ -647,6 +647,7 @@ static const char *
 linux_release_name(apr_pool_t *pool)
 {
   const char *uname_release = NULL;
+  const char *release_name;
 
 #if HAVE_UNAME
   uname_release = release_name_from_uname(pool);
@@ -654,7 +655,7 @@ linux_release_name(apr_pool_t *pool)
 
   /* Try anything that has /usr/bin/lsb_release.
      Covers, for example, Debian, Ubuntu and SuSE.  */
-  const char *release_name = lsb_release(pool);
+  release_name = lsb_release(pool);
 
   /* Try the systemd way (covers Arch). */
   if (!release_name)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.