Commits

Michał Górny committed 4bb7c80

Fix the 'initializer element is not computable at load time' error.

  • Participants
  • Parent commits 208b7d8

Comments (0)

Files changed (1)

File mirage-password.c

 }
 
 static mirage_tristate_t mirage_input_password_pinentry(void) {
-	const gchar* const shell = mirage_getshell();
-	const gchar* args[] = { shell, "-c", "exec pinentry", NULL };
+	const gchar* args[] = { NULL, "-c", "exec pinentry", NULL };
 	gint noclose[] = { -1 };
 	gchar *rcvbuf;
 	gsize rcvlen;
 	assuan_context_t ctx;
 	assuan_error_t err;
 
+	args[0] = mirage_getshell();
+
 #ifdef HAVE_LIBASSUAN2
 	if (((err = assuan_new(&ctx))) != GPG_ERR_NO_ERROR) {
 		g_printerr("Failed to initialize libassuan: %s\n", assuan_strerror(err));
 		return error;
 	}
 
-	if (((err = assuan_pipe_connect(ctx, shell, args, noclose, NULL, NULL, 0))) != GPG_ERR_NO_ERROR) {
+	if (((err = assuan_pipe_connect(ctx, args[0], args, noclose, NULL, NULL, 0))) != GPG_ERR_NO_ERROR) {
 #else
-	if (((err = assuan_pipe_connect(&ctx, shell, args, noclose))) != ASSUAN_No_Error) {
+	if (((err = assuan_pipe_connect(&ctx, args[0], args, noclose))) != ASSUAN_No_Error) {
 #endif
 		g_printerr("Failed to launch pinentry: %s\n", assuan_strerror(err));
 		return error;