Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clang17++ compilation #133

Merged
merged 3 commits into from
Apr 11, 2024
Merged

Commits on Apr 9, 2024

  1. generate.py: fix some typos

    Signed-off-by: Etienne Cordonnier <[email protected]>
    Ecordonnier committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    afed951 View commit details
    Browse the repository at this point in the history
  2. helpers.py: remove __str__()

    - Most implementations of __str__() use invalid syntax (passing self explicitly as first parameter of __repr__() is not valid python syntax since __repr__ does not take an explicit parameter).
    For instance "print("schema_info: %s", schema_info)" triggers an error: "TypeError: SchemaInfo.__repr__() takes 1 positional argument but 2 were given"
    
    - There is no reason to explicitly call __repr__() from __str__(), since this is the default python behavior
    
    Signed-off-by: Etienne Cordonnier <[email protected]>
    Ecordonnier committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    20d3936 View commit details
    Browse the repository at this point in the history
  3. fix compilation error with clang++17

    ocispec/runtime_spec_schema_config_schema.h contains the following code which uses the reserved c++ keyword "class":
    typedef struct {
        char *class;
        int32_t priority;
        yajl_val _residual;
        unsigned int priority_present : 1;
    }
    
    Thus the code fails to compile with clang++ 17.
    
    Fixes containers#132 ( containers#132 )
    
    Signed-off-by: Etienne Cordonnier <[email protected]>
    Ecordonnier committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    86650dc View commit details
    Browse the repository at this point in the history