[hackers] [scc] cc1: abort in (potential future) unhandled case || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Fri, 27 May 2016 14:33:55 +0200 (CEST)

commit 2d3c0c4b70e668183723e5274e7ae01c6678a704
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Fri May 27 14:32:37 2016 +0200
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Fri May 27 14:32:37 2016 +0200

    cc1: abort in (potential future) unhandled case
    
    this prevents a potential uninitialised variable ntable and ntype.

diff --git a/cc1/types.c b/cc1/types.c
index 68990c6..72d5fa8 100644
--- a/cc1/types.c
+++ b/cc1/types.c
_AT_@ -97,6 +97,8 @@ getlimits(Type *tp)
                 case 16: ntype = 2; break;
                 }
                 break;
+ default:
+ abort();
         }
 
         return &limits[ntable][ntype];
Received on Fri May 27 2016 - 14:33:55 CEST

This archive was generated by hypermail 2.3.0 : Fri May 27 2016 - 14:36:16 CEST