Skip to content

Commit 82b9a3c

Browse files
committed
fw: fix spalding build errors
Signed-off-by: Liam McLoughlin <hexxeh@hexxeh.net>
1 parent a5d73c8 commit 82b9a3c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/fw/apps/watch/tictoc/spalding/tictoc_spalding.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ static void prv_draw_watch_hand(GContext *ctx, ClockHand *hand, GPointPrecise ce
9999
switch (hand->style) {
100100
case CLOCK_HAND_STYLE_POINTED:
101101
prv_draw_watch_hand_pointed(ctx, hand, GPointFromGPointPrecise(center), path);
102+
break;
102103
case CLOCK_HAND_STYLE_ROUNDED:
103104
case CLOCK_HAND_STYLE_ROUNDED_WITH_HIGHLIGHT:
104105
default:
@@ -115,21 +116,25 @@ static GPointPrecise prv_get_clock_center_point(ClockLocation location, const GR
115116
.x = bounds->size.w / 2,
116117
.y = bounds->size.h / 4,
117118
};
119+
break;
118120
case CLOCK_LOCATION_RIGHT:
119121
imprecise_center_point = (GPoint) {
120122
.x = bounds->size.w * 3 / 4 - 5,
121123
.y = bounds->size.h / 2,
122124
};
125+
break;
123126
case CLOCK_LOCATION_BOTTOM:
124127
imprecise_center_point = (GPoint) {
125128
.x = bounds->size.w / 2,
126129
.y = bounds->size.h * 3 / 4 + 6,
127130
};
131+
break;
128132
case CLOCK_LOCATION_LEFT:
129133
imprecise_center_point = (GPoint) {
130134
.x = bounds->size.w / 4 + 4,
131135
.y = bounds->size.h / 2,
132136
};
137+
break;
133138
default:
134139
// aiming for width / 2 - 0.5 to get the true center
135140
return (GPointPrecise) {

src/fw/mfg/spalding/mfg_info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void mfg_info_set_rtc_freq(uint32_t rtc_freq) {
106106

107107
void mfg_info_get_model(char* buffer) {
108108
MfgData data = prv_fetch_struct();
109-
strncpy(buffer, data.model, sizeof(data.model));
109+
strncpy(buffer, data.model, sizeof(data.model) + 0);
110110
data.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; // Just in case
111111
}
112112

0 commit comments

Comments
 (0)