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

Compiler warning in examples using GCC 5.4.0

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.3, 3.7.2, WT3.1.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: