Skip to content

Commit d8a1870

Browse files
committed
Fix wrong options
1 parent 0a30db7 commit d8a1870

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

app/src/main/java/com/duy/ccppcompiler/compiler/CompileSetting.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,19 @@ private String getGCCFlags() {
8989

9090
//-w
9191
boolean w = mPref.getBoolean(mContext.getString(R.string.pref_option_w_warning), false);
92-
if (!w) builder.addFlags("-w");
92+
if (w) builder.addFlags("-w");
9393

9494
//-wall
9595
boolean wall = mPref.getBoolean(mContext.getString(R.string.pref_option_wall_warning), false);
96-
if (!wall) builder.addFlags("-wall");
96+
if (wall) builder.addFlags("-Wall");
9797

9898
//Wextra
9999
boolean wExtra = mPref.getBoolean(mContext.getString(R.string.pref_option_wextra_warning), false);
100-
if (!wExtra) builder.addFlags("-Wextra");
100+
if (wExtra) builder.addFlags("-Wextra");
101101

102102
//Werror
103103
boolean Werror = mPref.getBoolean(mContext.getString(R.string.pref_option_werror), false);
104-
if (!Werror) builder.addFlags("-Werror");
104+
if (Werror) builder.addFlags("-Werror");
105105

106106
return builder.buildCommand();
107107
}

app/src/main/res/xml/preferences_compiler.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
33

4-
<PreferenceCategory
5-
android:summary="Add the commands when calling the compiler"
6-
android:title="General">
4+
<PreferenceCategory android:title="General">
75
<EditTextPreference
86
android:key="@string/pref_key_c_options"
7+
android:summary="Add the commands when calling C the compiler"
98
android:title="@string/pref_ccopts" />
109

1110
<EditTextPreference
1211
android:key="@string/pref_key_cxx_options"
12+
android:summary="Add the commands when calling the C++ compiler"
1313
android:title="@string/pref_cxxopts" />
1414
</PreferenceCategory>
1515

0 commit comments

Comments
 (0)