<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Using a char should be OK here.<br></div><div><br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Marc-André Laperle" <marc-andre.laperle@ericsson.com><br><b>To: </b>"Simon Marchi" <simon.marchi@polymtl.ca><br><b>Cc: </b>lttng-dev@lists.lttng.org<br><b>Sent: </b>Monday, January 20, 2014 3:25:07 PM<br><b>Subject: </b>Re: [lttng-dev] [PATCH] Use uint32_t for lttng_viewer_stream.metadata_flag<br><div><br></div>


<style id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>


<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">I'm not sure that's possible. Whether I change them to uint8_t or int8_t, I get warnings because they get used with strncpy which wants char. Any idea how to solve this?<br>
<br>
Marc-André<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr>
<div style="direction: ltr;" id="divRpF924636"><span style="color: #000000; font-family: Tahoma; font-size: small;" data-mce-style="color: #000000; font-family: Tahoma; font-size: small;" color="#000000" face="Tahoma" size="2"><b>From:</b> thundersim@gmail.com [thundersim@gmail.com] on behalf of Simon Marchi [simon.marchi@polymtl.ca]<br>
<b>Sent:</b> Friday, 17 January 2014 9:31 PM<br>
<b>To:</b> Marc-André Laperle<br>
<b>Cc:</b> lttng-dev@lists.lttng.org<br>
<b>Subject:</b> Re: [lttng-dev] [PATCH] Use uint32_t for lttng_viewer_stream.metadata_flag<br>
</span><br>
</div>
<div></div>
<div>
<div dir="ltr">While you are at it, you could change the char fields as well, since char is not exact-width either.</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On 17 January 2014 18:47, Marc-Andre Laperle <span dir="ltr">
<<a href="mailto:marc-andre.laperle@ericsson.com" target="_blank">marc-andre.laperle@ericsson.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
This struct is meant to be sent over the network so members should be<br>
of exact-width.<br>
<br>
Signed-off-by: Marc-Andre Laperle <<a href="mailto:marc-andre.laperle@ericsson.com" target="_blank">marc-andre.laperle@ericsson.com</a>><br>
---<br>
 src/bin/lttng-relayd/lttng-viewer.h | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/bin/lttng-relayd/lttng-viewer.h b/src/bin/lttng-relayd/lttng-viewer.h<br>
index 1977a43..6330270 100644<br>
--- a/src/bin/lttng-relayd/lttng-viewer.h<br>
+++ b/src/bin/lttng-relayd/lttng-viewer.h<br>
@@ -100,7 +100,7 @@ struct lttng_viewer_session {<br>
 struct lttng_viewer_stream {<br>
        uint64_t id;<br>
        uint64_t ctf_trace_id;<br>
-       int metadata_flag;<br>
+       uint32_t metadata_flag;<br>
        char path_name[LTTNG_VIEWER_PATH_MAX];<br>
        char channel_name[LTTNG_VIEWER_NAME_MAX];<br>
 } __attribute__((__packed__));<br>
<span class="HOEnZb"><span style="color: #888888;" data-mce-style="color: #888888;" color="#888888">--<br>
1.8.3.2<br>
<br>
<br>
_______________________________________________<br>
lttng-dev mailing list<br>
<a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
<a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" target="_blank">http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
</span></span></blockquote>
</div>
<br>
</div>
</div>
</div>
</div>


<br>_______________________________________________<br>lttng-dev mailing list<br>lttng-dev@lists.lttng.org<br>http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev<br></blockquote><div><br><br></div><div><br></div><div>-- <br></div><div><span name="x"></span>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com<span name="x"></span><br></div></div></body></html>