Ticket #917: 0001-Silence-clang-return-type-warnings-by-removing-else-.patch

File 0001-Silence-clang-return-type-warnings-by-removing-else-.patch, 1.4 KB (added by Jim Ursetto, 12 years ago)
  • chicken.h

    From 2968e539d11405c5a97369f25a73f30465a242ad Mon Sep 17 00:00:00 2001
    From: Jim Ursetto <zbigniewsz@gmail.com>
    Date: Fri, 14 Sep 2012 09:45:23 -0500
    Subject: [PATCH] Silence clang return type warnings by removing else keyword
     after calls to C_div_by_zero_error
    
    ---
     chicken.h |    8 ++++----
     1 files changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/chicken.h b/chicken.h
    index f82c708..5ead361 100644
    a b C_inline C_word C_i_fixnum_max(C_word x, C_word y) 
    22882288C_inline C_word C_fixnum_divide(C_word x, C_word y)
    22892289{
    22902290  if(y == C_fix(0)) C_div_by_zero_error("fx/");
    2291   else return C_u_fixnum_divide(x, y);
     2291  return C_u_fixnum_divide(x, y);
    22922292}
    22932293
    22942294
    22952295C_inline C_word C_fixnum_modulo(C_word x, C_word y)
    22962296{
    22972297  if(y == C_fix(0)) C_div_by_zero_error("fxmod");
    2298   else return C_u_fixnum_modulo(x, y);
     2298  return C_u_fixnum_modulo(x, y);
    22992299}
    23002300
    23012301
    C_a_i_flonum_quotient_checked(C_word **ptr, int c, C_word n1, C_word n2) 
    23322332  double n3 = C_flonum_magnitude(n2);
    23332333
    23342334  if(n3 == 0.0) C_div_by_zero_error("fp/?");
    2335   else return C_flonum(ptr, C_flonum_magnitude(n1) / n3);
     2335  return C_flonum(ptr, C_flonum_magnitude(n1) / n3);
    23362336}
    23372337
    23382338
    C_inline double 
    23402340C_ub_i_flonum_quotient_checked(double n1, double n2)
    23412341{
    23422342  if(n2 == 0.0) C_div_by_zero_error("fp/?");
    2343   else return n1 / n2;
     2343  return n1 / n2;
    23442344}
    23452345
    23462346