krb5_error_code KRB5_CALLCONV
krb5_init_secure_context(krb5_context *context)
{
-
- /* This is to make gcc -Wall happy */
- if(0) krb5_brand[0] = krb5_brand[0];
- return init_common (context, TRUE, FALSE);
+ /*
+ * This is rather silly, but should improve our chances of
+ * retaining the krb5_brand array in the final linked library,
+ * better than a static variable that's unreferenced after
+ * optimization, or even a non-static symbol that's not exported
+ * from the library nor referenced from anywhere else in the
+ * library.
+ *
+ * If someday we grow an API to actually return the string, we can
+ * get rid of this silliness.
+ */
+ int my_false = (krb5_brand[0] == 0);
+ return init_common (context, TRUE, my_false);
}
krb5_error_code