Skip to content

Commit 7a17220

Browse files
committed
[roottest] Fix some warnings on mac
1 parent 1268ee2 commit 7a17220

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

roottest/cling/offset/runvbase.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct Bottom : public Mid1, Mid2
3535
#pragma warning(push)
3636
#pragma warning(disable : 4584)
3737
#endif
38-
#ifdef __CLING__
38+
#if defined(__clang__)
3939
#pragma clang diagnostic push
4040
#pragma clang diagnostic ignored "-Winaccessible-base"
4141
#endif

roottest/root/io/evolution/Event_3.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ void Event::Build(Int_t ev, Int_t arg5, Float_t ptmin) {
144144
if (ev >= 10000) nch += 3;
145145
if (fEventName) delete [] fEventName;
146146
fEventName = new char[nch];
147-
sprintf(fEventName,"Event%d_Run%d",ev,200);
148-
sprintf(etype,"type%d",ev%5);
147+
snprintf(fEventName, nch, "Event%d_Run%d",ev,200);
148+
snprintf(etype, sizeof(etype), "type%d",ev%5);
149149
SetType(etype);
150150
SetHeader(ev, 200, 960312, random);
151151
SetNseg(Int_t(10*ntrack+20*sigmas));

0 commit comments

Comments
 (0)