You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.1 KiB

  1. From 9588b5c9c27239b1f8c02f0bf417f13735e93225 Mon Sep 17 00:00:00 2001
  2. From: Stijn Tintel <stijn@linux-ipv6.be>
  3. Date: Sat, 26 Sep 2020 04:34:18 +0300
  4. Subject: [PATCH] HOST-MIB, hr_filesys: fix compile error
  5. On non-AIX systems without getfsstat, a variable is being declared right
  6. after a label. This is a violation of the C language standard, and
  7. causes the following compile error:
  8. host/hr_filesys.c: In function 'Get_Next_HR_FileSys':
  9. host/hr_filesys.c:752:5: error: a label can only be part of a statement and a declaration is not a statement
  10. const char **cpp;
  11. ^~~~~
  12. Fix the problem by adding an empty statement after the label.
  13. Fixes: 22e1371bb1fd ("HOST-MIB, hr_filesys: Convert recursion into iteration")
  14. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
  15. ---
  16. agent/mibgroup/host/hr_filesys.c | 2 +-
  17. 1 file changed, 1 insertion(+), 1 deletion(-)
  18. --- a/agent/mibgroup/host/hr_filesys.c
  19. +++ b/agent/mibgroup/host/hr_filesys.c
  20. @@ -718,7 +718,7 @@ static const char *HRFS_ignores[] = {
  21. int
  22. Get_Next_HR_FileSys(void)
  23. {
  24. -next:
  25. +next: ;
  26. #if HAVE_GETFSSTAT
  27. if (HRFS_index >= fscount)
  28. return -1;