Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-3845

Compiler warning in examples using GCC 5.4.0

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.3, 3.7.2, WT3.1.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage 2018-01-15

      I'm seeing a compiler warning that results in a compilation error when using --enable-strict:

      ../../../examples/c/ex_smoke.c: In function ‘main’:
      ../../../examples/c/ex_smoke.c:48:2: error: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Werror=unused-result]
        (void)system("rm -rf WT_HOME && mkdir WT_HOME");
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      

      We should handle an error elegantly.

            Assignee:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: