Changeset 2766

Show
Ignore:
Timestamp:
02/19/18 15:38:00 (6 years ago)
Author:
jwoithe
Message:

Fix handling of errno in test-mixer and test-pan.

To maintain compatibility with gcc6, errno can no longer be initialised like
a variable. To ensure it's always defined, inclusion of cerrno is needed.

These issues were solved in test-volume.cpp and test-enhanced-mixer.cpp
in r2605 (errno initialisation) and r2607 (inclusion of cerrno). Obviously
the same changes are needed in test-mixer and test-pan., and it's not clear
how this was missed in the earlier patches. It is probably related to the
fact that these test programs are rarely compiled these days.

Patch from Dave Plater.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/tests/test-mixer.cpp

    r969 r2766  
    2929#include "libieee1394/ieee1394service.h" 
    3030#include <string.h> 
     31#include <cerrno.h> 
    3132 
    3233DECLARE_GLOBAL_DEBUG_MODULE; 
     
    228229    } 
    229230 
    230     int errno = 0; 
     231    errno = 0; 
    231232    char* tail; 
    232233    int port = strtol( argv[1], &tail, 0 ); 
  • trunk/libffado/tests/test-pan.cpp

    r1340 r2766  
    2727 
    2828#include "libieee1394/ieee1394service.h" 
     29#include <cerrno> 
    2930 
    3031const bool bVerbose = false; 
     
    132133    } 
    133134 
    134     int errno = 0; 
     135    errno = 0; 
    135136    char* tail; 
    136137    int node_id = strtol( argv[1], &tail, 0 );