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

Compiler warning in examples using GCC 5.4.0

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.6.3, 3.7.2, WT3.1.0
    • None
    • None
    • Storage 2018-01-15

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: