[Bug 280566] tree(3) man page: Fix example source code.

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 02 Aug 2024 04:33:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280566

            Bug ID: 280566
           Summary: tree(3) man page: Fix example source code.
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Manual Pages
          Assignee: bugs@FreeBSD.org
          Reporter: hodong@nimfsoft.art
                CC: doc@FreeBSD.org

Created attachment 252444
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=252444&action=edit
Fix the example source code in tree(3) man page EXAMPLES.

The example source code in the tree(3) manual page causes compilation error.

$ cc -Wall example.c -o example
example.c:25:9: warning: non-void function does not return a value
[-Wreturn-type]
   25 |         }
      |         ^
example.c:75:24: warning: missing terminating '"' character
[-Winvalid-pp-token]
   75 |                 printf("Sum of values = %d0, RB_ROOT(&head)->sum);
      |                        ^
example.c:75:24: error: expected expression
example.c:78:10: error: expected '}'
   78 |         }
      |          ^
example.c:60:9: note: to match this '{'
   60 |         {
      |         ^
2 warnings and 2 errors generated.

This patch fixes errors.

-- 
You are receiving this mail because:
You are the assignee for the bug.