• brian-peloton's avatar
    Removing undefined behavior and compiler warnings (#1315) · 40da1ed5
    brian-peloton authored
    * Comment out unused arguments.
    
    These last few are all that's needed to compile with -Wunused-arguments.
    
    * Fix missing struct field initializer.
    
    With this fix, everything compiles with -Wmissing-field-initializers.
    
    * Add support for disabling unaligned memory accesses on x86 too.
    
    ubsan doesn't like these because they are technically undefined
    behavior, so -DGOOGLE_PROTOBUF_DONT_USE_UNALIGNED will disable them easily.
    
    * Avoid undefined integer overflow.
    
    ubsan catches all of these.
    40da1ed5
wire_format_lite.h 39.7 KB